Created
June 4, 2024 20:02
-
-
Save SarahElson/4e8e82f15f76c504740ae551114a29a9 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 SmartWait(): | |
def __init__(self, driver): | |
self.driver = driver | |
self.driver.get("https://ecommerce-playground.lambdatest.io/") | |
self.blog_link = driver.find_element(By.LINK_TEXT, "Blog") | |
def click_blog_link(self): | |
self.blog_link.click() | |
def click_first_post(self): | |
self.driver.find_element(By.TAG_NAME, "h4").click() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment