Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am using Selenium to test web application. I am trying to select from drop down the day but it is not loading the value.
I am using Selenium to test web application. I am trying to select from drop down the day but it is not loading the value. It keeps waiting and throws exception so I added some wait to it so after reaching wait time, it throws exception.
WebElement daySelect = driver.findElement(By.id("days"));
Select days = new Select(daySelect);
days.selectByValue("Value");
NebElement dayselectElement woi tM.until (ExpectedCondi tions.elenent ToBeClickableBy. id Select days new Select(daySelectElement); days: days.select3yWalue3 /* driver.manageC).tineoutsO.implicitlyWoit(18, TimeUnit. SECONDS); WebElenent monthSelectElenent - waitH.until(ExpectedConditions.element ToeClickableCBy. idC"months")); Select monthe new Select(monthSelectElement); month.selectByValue(2); driver.monageC) tineoutsO.implicitlywait(10, Tinelnit. SECONDs); NebElenent yearsSelectElenent wai tM,until(ExpectedConditions.visibilityOfElementLocated(By. idC"years"))); Select yearse new Select(yearsSelectElement); years.selectByIndex(20)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started