开发者

Selenium link with class

I need to click all dinamic page links with same @class.Is there a way to do that in 开发者_运维知识库selenium?


Did you try using element position in xPath like a[@class='sameClass'][1]?


I would get a count of the HTML elements with the class using getxpathcount. Then loop over those elements and within the loop perform a click. I've written some functions that do this. Basically get an xpath count. Loop over the count to get the xpath's, stuff into an array. Loop over array with a click.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜