Selenium wait for element to be clickable python

后端 未结 2 640
后悔当初
后悔当初 2021-01-03 10:41

All, I\'m needing a little assistance with Selenium waits. I can\'t seem to figure out how to wait for an element to be ready.

The element that I am needing to wait

2条回答
  •  忘掉有多难
    2021-01-03 11:08

    Here is a link to the 'waiting' section of the Python Selenium docs: http://selenium-python.readthedocs.io/waits.html#explicit-waits

    You wait should look like this:

    element = WebDriverWait(driver, 10).until(
        EC.visibility_of((By.XPATH, ".//*[@id='line']/div[1]/a"))
    )
    

提交回复
热议问题