-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests_python
25 lines (21 loc) · 983 Bytes
/
tests_python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import unittest
from selenium import webdriver
class Login(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.driver = webdriver.Chrome("/home/ute/Documents/Work/Develop/Python/webdriver_my/chromedriver")
cls.driver.implicitly_wait(33)
cls.driver.maximize_window()
def test_login_valid(self):
self.driver.get("https://www.ryanair.com/ie/en/")
self.driver.find_element_by_css_selector("#myryanair-auth-login").click()
self.driver.find_element_by_css_selector("[name='emailAddress']").send_keys("gora2ks@gmail.com")
self.driver.find_element_by_css_selector("#password308").send_keys("Gogodz78600")
self.driver.find_element_by_css_selector("button[type='submit'][class='core-btn-primary']").click()
@classmethod
def tearDownClass(cls):
cls.driver.close()
cls.driver.quit()
print("Test complite")
if __name__ == '__main__':
unittest.main()