Selenium Can't Find Option Form Element By Xpath
I'm trying to click on an option in a select menu via: driver.implicitly_wait(30) driver.find_element_by_xpath('//select[option/@value='today']').click() but it doesn't work (prin
Solution 1:
Your XPath looks wrong. Try:
"//select/option[@value='today']"
Solution 2:
Select day = new Select(driver.findElement(By.cssSelector(".itc_listBox")));
day.selectByVisibleText("Today");
or
day.selectByValue("today")
You can try either of the above.
Post a Comment for "Selenium Can't Find Option Form Element By Xpath"