diff --git a/sample.py b/sample.py index 904c65a..d040b5b 100644 --- a/sample.py +++ b/sample.py @@ -4,9 +4,11 @@ if __name__ == "__main__": driver = webdriver.Chrome() driver.get("https://waylonwalker.com/") - - passed = driver.find_element_by_css_selector(".about").is_displayed() - + headers = driver.find_elements_by_tag_name("h2") + + passed = headers[0].is_displayed() + + print('number of headers: ', len(headers)) print("Test passed") if passed else print("Test failed") driver.quit()