Create sample.py
This commit is contained in:
parent
5556440112
commit
6a13c5b827
1 changed files with 16 additions and 0 deletions
16
sample.py
Normal file
16
sample.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from src.testproject.sdk.drivers import webdriver
|
||||
|
||||
if __name__ == "__main__":
|
||||
driver = webdriver.Chrome()
|
||||
|
||||
driver.get("https://example.testproject.io/web/")
|
||||
|
||||
driver.find_element_by_css_selector("#name").send_keys("John Smith")
|
||||
driver.find_element_by_css_selector("#password").send_keys("12345")
|
||||
driver.find_element_by_css_selector("#login").click()
|
||||
|
||||
passed = driver.find_element_by_css_selector("#logout").is_displayed()
|
||||
|
||||
print("Test passed") if passed else print("Test failed")
|
||||
|
||||
driver.quit()
|
||||
Loading…
Add table
Add a link
Reference in a new issue