Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
ravinder4141 Absent Member.
Absent Member.
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.

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

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
0 Likes
ravinder4141 Absent Member.
Absent Member.

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
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.