Skip to content Skip to sidebar Skip to footer

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:

Selectday=newSelect(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"