Created
June 4, 2024 19:45
-
-
Save SarahElson/150bf1edcf626dfd5c9b3e12d83e1605 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 ImplicitWait: | |
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 is_email_displayed(self): | |
return self.driver.find_element(By.NAME, "email").is_displayed() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment