[英]What do I use as the argument for the `click()` method when the button has no name or ID?
I'm using the Java Selenium RC and I want to know how to use the click method from the DefaultSelenium.我正在使用 Java Selenium RC,我想知道如何使用 DefaultSelenium 中的单击方法。 How do I specify to click a button?如何指定单击按钮? I know when I use the "Inspect Element" on a button sometimes it says name=btng
or id="search"
but sometimes it has neither.我知道当我在按钮上使用“检查元素”时,有时会显示name=btng
或id="search"
但有时两者都没有。 When this is the case, what do I use as the argument for the click()
method?在这种情况下,我应该使用什么作为click()
方法的参数?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.