Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created June 7, 2024 05:27
Show Gist options
  • Save SarahElson/c36681264fc66f9022943a0643d219bd to your computer and use it in GitHub Desktop.
Save SarahElson/c36681264fc66f9022943a0643d219bd to your computer and use it in GitHub Desktop.
How to Wait in Python: Python Wait Tutorial With Examples
import pytest
from pages.implicit_wait import *
@pytest.mark.usefixtures("driver")
def test_implicit_wait(driver):
implicit_wait = ImplicitWait(driver)
implicit_wait.click_my_account()
# driver implicit wait method
driver.implicitly_wait(3)
is_email_displayed = implicit_wait.is_email_displayed()
assert is_email_displayed == True, f"Expected {is_email_displayed} to equal True"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment