Skip to content

Remove sleep when waiting for page to load #4

Description

@isaacOnline

Adapt the following snippet to remove the sleep time when waiting for the download button to appear:

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

delay = 40

download_button = WebDriverWait(driver, delay).until(
    EC.presence_of_element_located(
         (By.XPATH, '//a[text()="Download"]')
    )
)
download_button.click()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions