Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created June 4, 2024 19:36
Show Gist options
  • Save SarahElson/026cebb0ea676523cbf4338c0615c4fb to your computer and use it in GitHub Desktop.
Save SarahElson/026cebb0ea676523cbf4338c0615c4fb to your computer and use it in GitHub Desktop.
How to Wait in Python: Python Wait Tutorial With Examples
from selenium.webdriver.common.by import By
class SleepWait:
def __init__(self, driver):
self.driver = driver
self.driver.get("https://ecommerce-playground.lambdatest.io/")
self._elements = self.driver.find_elements(By.CLASS_NAME, value="title")
self._elements_count = len(self._elements)
def get_elements_count(self):
return self._elements_count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment