Update sample.py
This commit is contained in:
parent
5863bd70d4
commit
5d64b2e9de
1 changed files with 15 additions and 0 deletions
15
sample.py
15
sample.py
|
|
@ -1,5 +1,17 @@
|
||||||
from src.testproject.sdk.drivers import webdriver
|
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__":
|
if __name__ == "__main__":
|
||||||
driver = webdriver.Chrome()
|
driver = webdriver.Chrome()
|
||||||
|
|
||||||
|
|
@ -8,6 +20,9 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
passed = headers[0].is_displayed()
|
passed = headers[0].is_displayed()
|
||||||
|
|
||||||
|
print('these are the headers')
|
||||||
|
print(headers)
|
||||||
|
print()
|
||||||
print('number of headers: ', len(headers))
|
print('number of headers: ', len(headers))
|
||||||
print("Test passed") if passed else print("Test failed")
|
print("Test passed") if passed else print("Test failed")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue