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 的自动化来单击没有类或 id 的 div 中的按钮和文本区域:
您可以使用下面xpath的点击button:
xpath
button
//input[@value='OK']
//input[@value='Cancel']
对于,您可以使用上述 xpathtextarea编写:relative xpath
textarea
relative xpath
//input[@value='OK']/../textarea