我正在尝试使用选项发送文本。这是我的类页面对象中的方法案例:sendkeys()
public void setEntityName() {
internalWait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"entity_name\"]")));
entityName.clear();
entityName.sendKeys("TEST");
}
网页:
<input id="entity_name" name="entity_name" type="text" ng-model="entityData.name" ng-disabled="false" placeholder="Type Enity Name" data-maxlength="20" data-smart-validate-input="" data-required="" class="ng-pristine ng-invalid ng-invalid-required ng-valid-maxlength ng-touched">
测试显示错误
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.xpath: //*[@id="entity_name"]
任何人都可以帮助我解决此错误。
临摹微笑
相关分类