Created
June 4, 2024 19:58
-
-
Save SarahElson/4d74d66c81a8a62cab74005dd4aa2729 to your computer and use it in GitHub Desktop.
How to Wait in Python: Python Wait Tutorial With Examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium.webdriver.common.by import By | |
class FluentWait: | |
def __init__(self, driver): | |
self.driver = driver | |
self.driver.get("https://ecommerce-playground.lambdatest.io/") | |
# Ensure page load complete | |
driver.set_page_load_timeout(10) | |
self._my_account = self.driver.find_element(By.LINK_TEXT, "My account") | |
def click_my_account(self): | |
self._my_account.click() | |
def get_password_input(self): | |
return self.driver.find_element(By.NAME, "password") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment