开发者

how to select a particular row in a data grid using selenium?

开发者 https://www.devze.com 2023-02-05 02:06 出处:网络
1.I have User Registration page and need to select newly registered user in a dat开发者_如何学运维a table as admin.

1.I have User Registration page and need to select newly registered user in a dat开发者_如何学运维a table as admin. 2.based on the user roles it will be placed anywhere in the data grid. 3.Need to select a particular user for approve it.

Thanks in Advance!


Complete shot in the dark due to ack of information but assuming your table has a cell with the user name and you want to click on the row containing it:

selenium.click("//table[@id='']/descendant::tr[td[.='']]");

We would need to see the entire HTML of your page and we would need to know what information you are storing about the user you are registering to give you a accurate answer.


Just adding my solution for future readers:

If you have the row object, try to get it's columns collection.

Then click column 0.

0

精彩评论

暂无评论...
验证码 换一张
取 消