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(java 服务器)单击一个按钮 - 该按钮只有一个类型,没有 id/值。任何有用的建议都将受到欢迎
<button type="submit">Enter</button>
另一个选项是 //button[contains(text(),'Enter')],但如果您有本地化站点,这会中断..
以下对我有用:
selenium.click("//button[@type='submit']"