Created
June 7, 2024 05:14
How to Wait in Python: Python Wait Tutorial With Examples
This file contains 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
import pytest | |
from selenium.webdriver.common.by import By | |
from pages.sleep_wait import * | |
import time | |
@pytest.mark.usefixtures("driver") | |
def test_sleep_wait(driver): | |
class_title_elements_count = 34 | |
elements_count = SleepWait(driver) | |
# Python sleep method used to wait | |
time.sleep(5) | |
count = elements_count.get_elements_count() | |
assert count == class_title_elements_count\ | |
, f"Expected {count} to be {class_title_elements_count}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment