I am trying to select specific values from 2 Ajax popup fields. The first list of drop-down lists opens, but does not select an option, so the second drop-down list is optional, and the error occurs as
org.openqa.selenium.NoSuchElementException: Cannot find the item: Option [value = "111"].
Please help me .. I'm new to selenium
Here is my code ..
HTML block:
This issue occurred due to a Firefox browser compatibility issue (version 45). I am using selenium 3.0.0-beta2 and testing against Firefox 45.0.2
geckodriver ( 0.10.0) 10 -64 , , - . Firefox 48 .
. - :
Select dropdown = new Select(driver.findElement(By.id("cmbJob"))); dropdown.selectByValue("111");
dropdwns:
protected void chooseOptionInSelectByValue(String selectId, String valueString) { Select dropdown = new Select(driver.findElement(By.id(selectId))); dropdown.selectByValue(valueString); }
, ,
chooseOptionInSelectByValue("cmbJob","111");
Selenium , selectByText .. API : https://seleniumhq.imtqy.com/selenium/docs/api/java/org/openqa/selenium/support/ui/Select.html
Source: https://habr.com/ru/post/1652289/More articles:Развертывание входных очередей Tensorflow и валидация - deep-learningIn x86 assembly, is it better to use two separate registers for imul? - performancePreferred syntax for verilog module declaration - syntaxCustom printing in jupyter laptop - pythonGroup by column and sum of contents of another python column - pythonAdding a pad to the first and last cell of a UICollectionView - iosJava socket does not always receive all bytes - javaReading data from a Java socket - javaУлучшите временную сложность текущих запросов Linq - c#Как скользить внутри и снаружи снизу в React Native? - javascriptAll Articles