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.
我正在尝试从元素属性中获取元素 ID(这里是列表),但没有成功。这是我的 html 代码:
我试过了:
get element attribute //*[@class="rqbar"]@id
有没有办法获取id?
谢谢
您的代码几乎是正确的。以下是我的更正:
*** Settings *** Library Selenium2Library Suite Teardown Close All Browsers *** Test Cases *** StackOverflow Open Browser http://www.google.com/ Chrome ${id}= get element attribute xpath=//*[@class="sbib_b"]@id