Highlighted
ravinder4141

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-03
04:14
331 views
Regarding automation of Grids using silk4j
We are facing issue at the time of automation of Grids using silk4j.Grids are not in tabular form and rows and columns values are not in the form of tr and td.
Values of locator are also changing after clicking of any grid element and it become unique for all the locator.Please suggest any solution for this issue.
2 Replies

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-03
06:41
RE: Regarding automation of Grids using silk4j
Hi,
I would recommend logging a support incident so that an engineer can have a look at the grid and provide some advice on how best to automate it.
If this is not possible, I assume that the grid is generated using some 3rd party JavaScript library and likely consists of a number of DIV elements. Generally what you should find is that each row in your grid follows a similar pattern or share similar attributes. For example, each row element may share a similar "class" attribute or the "id" attribute may contain the text "row".
If this is the case, then finding the rows of your grid may be straightforward. For example:
List<DomElement> gridRows = desktop.<DomElement>findAll("//DIV[@class='row-class']");
If you can get a list of the grid rows, similar to the above, you should be able to iterate through each row and retrieve the required cell to interact with. For example:
//Get the text from the 2nd cell of the first row
String cellText = gridRows.get(0).<DomElement>find(/*[2]).getText();
-Robert
I would recommend logging a support incident so that an engineer can have a look at the grid and provide some advice on how best to automate it.
If this is not possible, I assume that the grid is generated using some 3rd party JavaScript library and likely consists of a number of DIV elements. Generally what you should find is that each row in your grid follows a similar pattern or share similar attributes. For example, each row element may share a similar "class" attribute or the "id" attribute may contain the text "row".
If this is the case, then finding the rows of your grid may be straightforward. For example:
List<DomElement> gridRows = desktop.<DomElement>findAll("//DIV[@class='row-class']");
If you can get a list of the grid rows, similar to the above, you should be able to iterate through each row and retrieve the required cell to interact with. For example:
//Get the text from the 2nd cell of the first row
String cellText = gridRows.get(0).<DomElement>find(/*[2]).getText();
-Robert
ravinder4141

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-05
00:11
RE: Regarding automation of Grids using silk4j
Hi Robert,
Thanks for update.
Can you please confirm url ,where I can raise an incident.
Regards,
Ravinder
Thanks for update.
Can you please confirm url ,where I can raise an incident.
Regards,
Ravinder