Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

SmartClientWebDriver: Getting collection of row values from particular column.

$
0
0
Hi,

Our Smartclient application has a Listgrid which binded with REST data source.

In this case, we are having ‘n’ number of rows and columns.
This application is developed using smartGWT4.1 version.

We are automating this page, our requirement is, get the values from column 6 for all displayed row.

When we try this scenario in Firefox selenium IDE, sc locator is formed for one ROW one column.

Example:
scLocator=//ListGrid[ID="groupID1111"]/body/row[resourceId=1000||resourceStatus=OK||resorceNumber=111111||0]/col[fieldName=yyyNumber||6]

As shown above, this scLocator trying to get a single element from Row=0 and Column=6.
But we want collection of element for all row for column=6.

We need to use findelements.

In xpath locator, we use as below

List<WebElement> collection = Driver.findelements(By.xpath(“.//*[contains(@eventproxy, groupID1111)]//*/table/tbody/tr/td[6]”)).

In this xpath case, we are using tr without any [].So it gets all the row for column 6.

But if we tried following things to get collection in scLocator.
Case1: scLocator =//ListGrid[ID="groupID1111"]/body/row/col[fieldName=yyyNumber||6]
Case2: scLocator =//ListGrid[ID="groupID1111"]/body/row[]/col[fieldName=yyyNumber||6]

But does not give any element.

So please let us know, how we get collection of all rows for particular column

Thank you.

Viewing all articles
Browse latest Browse all 4756

Trending Articles