Такой элемент не найден для выпадающего списка - PullRequest
0 голосов
/ 28 мая 2019
Select stockLocation = new Select(
  new WebDriverWait(driver, 100)
   .until(ExpectedConditions.visibilityOfElementLocated(
      By.xpath("//select[@class='form-control ng-pristine ng-valid ng-not-empty ng-touched']")
   )
  )
);
stockLocation.selectByVisibleText("03 - Damage (viewable)");

Ошибка:

Exception in thread "main" org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.xpath: //select[@class='form-control ng-pristine ng-valid ng-not-empty ng-touched'] org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:95) at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272) at com.ups.vcat.VcatAutoUpdateFreightException.main(VcatAutoUpdateFreightException.java:44) Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...