-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBrowserTest
More file actions
52 lines (38 loc) · 1.12 KB
/
Copy pathBrowserTest
File metadata and controls
52 lines (38 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
# define browser
driver = webdriver.Chrome()
# open page
driver.get("")
# click forgot password button
ForgotPassword = driver.find_element_by_id("idForgotPassword")
ForgotPassword.click()
# back to login page
driver.back()
# click, clear and type login email
LoginEmail = driver.find_element_by_id("idEmailAddress")
LoginEmail.click()
LoginEmail.clear()
LoginEmail.send_keys("")
# click, clear and type login password
LoginPassword = driver.find_element_by_id("idPassword")
LoginPassword.click()
LoginPassword.clear()
LoginPassword.send_keys("")
# click login button
LoginButton = driver.find_element_by_id("loginButton")
if LoginButton.is_displayed():
print("Login button is visible")
else:
print("Login button is NOT visible")
LoginButton.click()
driver.implicitly_wait(10)
# verify the logo
LogoIcon = driver.find_element_by_xpath("//*[@alt=' ']")
if LogoIcon.is_displayed():
print("TUO")
else:
print("Logo icon is NOT visible")
# verify the search bar
#SearchBar = driver.find_element_by_id("idSearch")
#SearchBar.send_keys("big")