<div class="k-grid-content">
<table>
<tbody>
<tr>
<td>row1Col1</td>
<td>row1Col2</td>
<td>row1Col3</td>
</tr>
<tr>
<td>row2Col1</td>
<td>row3Col2</td>
<td>row4Col3</td>
</tr>
<tr>
<td>row3Col1</td>
<td>row3Col2</td>
<td>row3Col3</td>
</tr>
</tbody>
</table>
</div>
var grid = element.all(by.css('.k-grid-content tr')); //this will return row1,row2,row3
ํ์ง๋ง ์๋ ์ฝ๋๋ฅผ ์ฌ์ฉํ์ฌ ๊ฐ ํ๊ณผ ์ด์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค.
grid.each.each(function(row){
var rowElems = row.findElements(by.tagName('td'));
expect(rowElems.get(0).getText()).toMatch('/Col1/');
});
๋ค์ ์ค๋ฅ ๋ฉ์์ง๊ฐ ํ์๋ฉ๋๋ค. ๋ฉ์์ง: TypeError: Object [object Object]์ 'findElements' ๋ฉ์๋๊ฐ ์์ต๋๋ค.
SO์ ๋ํ ๋ต๋ณ์ @elgalu ์๊ฒ ๊ฐ์ฌ๋๋ฆฝ๋๋ค!
@elgalu @juliemr StackOverflow ์ ๋ํ ๋ต๋ณ์ ์ฐธ์กฐํ๋ฉด, ".each"๊ฐ grid.filter(function(row) {
์ด์ํ ํ๋์ ๋ํ ์๊ฐ์ด ์์ต๋๊น?