【发布时间】:2020-01-26 23:30:32
【问题描述】:
以下是我尝试使用各种选项单击但不起作用的按钮的 HTML:
<button data-ng-click="Question.setAnswer(button.value,button.attemptNext)" class="btn btn-sm btn-primary " type="button">No</button>
我尝试了以下
new WebDriverWait(driver, 0).until(ExpectedConditions.elementToBeClickable(By.xpath("//input[@class='btn btn-sm btn-primary' and @value='No']"))).click();
但它不起作用 TIA
这是控制台信息。 在添加该行之前,我一直在看到 webdriver 错误 只允许本地连接。 请保护 ChromeDriver 和相关测试框架使用的端口,防止恶意代码访问。 2020 年 1 月 27 日下午 1:03:02 org.openqa.selenium.remote.ProtocolHandshake createSession 信息:检测到的方言:W3C 发生 WebDriverException
【问题讨论】:
-
这里是 HTML
标签: selenium selenium-webdriver xpath