I created a program to log into the site, but it loads very slowly when it opens, and for that I need to put sleep (40), which waits 40 seconds to open, but has times that takes 50 seconds and the error and has hours it takes 20 seconds and it is very idle time, I tried the webdriverwait but it did not work, would you have some solution to give me? This code gives the following error: selenium.common.exceptions.TimeoutException: Message:
driver = webdriver.Chrome('C:\scrapy\chromedriver', chrome_options=chrome_options)
driver.get('site')
#sleep(25)
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.ID, "elementEmail"))
)
email = driver.find_element_by_xpath('//*[@translate="@APP-COMMON-EMAIL"]')
email.click()