【发布时间】:2017-03-20 02:44:35
【问题描述】:
我有以下按钮:
<button id="Organisation/user" class="button-2xhG8" data-reactid=".0.2:$organization.0.0.2:$1/47">org</button>
我正在尝试使用以下命令点击它:
browser.waitForExist("#Organisation/user",10000)
browser.click("#Organisation/user")
无济于事。但以下确实有效:
browser.waitForExist(".button-2xhG8",10000)
browser.click(".button-2xhG8")
并且我可以点击其他按钮,而无需用户在其 ID 中使用正斜杠。如何找到按钮?
【问题讨论】:
标签: javascript selenium css-selectors webdriver webdriver-io