how can i bypass the 500ms delay on explicit waits using selenium and python?

Please have a look at the official WebDriverWait function

You may simply set the poll_frequency to another value rather than 0.5, so for your case you may use poll_frequency=0.1.

This code will be an example with your wished frequency (taken from documentation)

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Firefox()
driver.get("http://somedomain/url_that_delays_loading")
try:
    element = WebDriverWait(driver, 10, poll_frequency=0.1).until(
        EC.presence_of_element_located((By.ID, "myDynamicElement"))
    )
finally:
    driver.quit()

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top