From 5d64b2e9deafbf37b261de734e7da40ba3795772 Mon Sep 17 00:00:00 2001 From: Waylon Walker Date: Fri, 24 Jul 2020 23:40:12 -0500 Subject: [PATCH] Update sample.py --- sample.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sample.py b/sample.py index d040b5b..fa89cc2 100644 --- a/sample.py +++ b/sample.py @@ -1,5 +1,17 @@ from src.testproject.sdk.drivers import webdriver +REPOS = ['find-kedro', 'kedro-static-viz', 'kedro-action', 'steel-toes', ] + +def test_github_packages(driver): + "check that each repo is represented in an h2" + header_text = [header.text for header in driver.find_elements_by_tag_name("h2")] + for repo in REPOS: + if repo not in header_text: + return False + return True + + + if __name__ == "__main__": driver = webdriver.Chrome() @@ -8,6 +20,9 @@ if __name__ == "__main__": passed = headers[0].is_displayed() + print('these are the headers') + print(headers) + print() print('number of headers: ', len(headers)) print("Test passed") if passed else print("Test failed")