waylonwalker-com-tests/sample.py
2020-07-20 15:17:53 -05:00

16 lines
526 B
Python

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()