Selenium click on link

好久不见. 提交于 2019-12-01 18:09:56

Selenium supports the link=Link Text locator as well. If you know the exact link text, you can use this locator, but not otherwise. So for your examples above: link=text2 or link=View Previous Statements. (See this site and this site for other locators.)

You Can Try

//a[contains(text(),'text2')]     OR  //span/a[contains(text(),'text2')]


Looking for same or anything else?

Please disregard this post. Selenium is ignoring the "Value" field and simply selecting the 1st occurrence of span.class3. Sorry about this. I should have tested more before posting.

Original post: I have a similar webpage, and I was able to use the following Selenium IDE command: command: clickAndWait target: css=span.class3 value: Text1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!