Getting the proper xpath for date picker in selenium

0 votes

I can see the below xpath exists but selenium pops up with the below error message

NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="calendar-btn"]/small"}

Jul 5, 2018 in Selenium by Martin
• 4,330 points
3,066 views

1 answer to this question.

0 votes

Try to use explicit wait. Sometimes it takes time to load the element or page

from selenium.webdriver.support import expected_conditions as EC

wait = WebDriverWait(driver, 15)

date = wait.until(EC.element_to_be_clickable((By.Xpath, '//*[@id="calendarbtn"]/small")))

Try to use explicit wait. Sometimes it takes time to load the element or page

from selenium.webdriver.support import expected_conditions as EC

wait = WebDriverWait(driver, 15)

date = wait.until(EC.element_to_be_clickable((By.Xpath, '//*[@id="calendarbtn"]/small")))
answered Jul 5, 2018 by Samarpit
• 5,890 points

Related Questions In Selenium

0 votes
1 answer

XPath for the elements with no ID or Name in Selenium Webdriver

Use like this or similar to this: //div[@id="top-level-menu-item-3"]/div[@class="filter-label"] //div[@id="top-level-menu1"] ...READ MORE

answered Apr 17, 2018 in Selenium by Meci Matt
• 9,460 points
4,184 views
0 votes
1 answer

Searching for the element with   symbol in selenium

Use Below: //div[@class='Tips' and text()='\u00a0'] READ MORE

answered Apr 20, 2018 in Selenium by Vardy
• 2,360 points
6,936 views
0 votes
2 answers

what is the need of xpath when you have attributes like id ,class,name in selenium?

some of the controls not have id ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
891 views
0 votes
1 answer

How to wait for the webpage to load in selenium using java

Firstly, when you launch a web application, ...READ MORE

answered Aug 29, 2018 in Selenium by bug_seeker
• 15,550 points
1,074 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
6,055 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
6,478 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
4,110 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
5,078 views
0 votes
1 answer

Maximizing the browser window in Selenium WebDriver using C#

Check this first: http://code.google.com/p/selenium/issues/detail?id=174 You Can use the JavascriptExector as follows: public ...READ MORE

answered May 2, 2018 in Selenium by Samarpit
• 5,890 points
344 views
0 votes
1 answer

Getting different texts from the HTML DOM through Selenium and Python

Try Below code: something = elem.find_element_by_xpath('./td[5]') text1 = driver.execute_script('return ...READ MORE

answered May 14, 2018 in Selenium by Samarpit
• 5,890 points
1,885 views