Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 selenium webdriver 中为单击网格格式的按钮编写代码,当由 xpath、classname.click 完成时,代码显示错误?
您需要先找到按钮(可以使用 xpath),然后单击找到的元素。
示例(红宝石代码)
driver.find_element(:xpath, '//xpath-here').click
尝试这个
selenium.clickAt("//button[@id='blabla']","");