-
Notifications
You must be signed in to change notification settings - Fork 1
/
24.py
69 lines (51 loc) · 1.75 KB
/
24.py
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
import time
desired_cap = {
'browser': 'Chrome',
'browser_version': '81.0 beta',
'os': 'Windows',
'build': 'UI Testing',
'os_version': '10',
'resolution': '1920x1080',
'name': 'Testing the share options of faculty timetable'
}
driver = webdriver.Remote(
command_executor='http://ankushpathak1:[email protected]:80/wd/hub',
desired_capabilities=desired_cap)
driver.get('http://akashsuper2000.github.io/faculty-dashboard')
driver.get('http://akashsuper2000.github.io/faculty-dashboard')
driver.fullscreen_window()
time.sleep(2)
username = driver.find_element_by_name('id')
username.send_keys('sample')
password = driver.find_element_by_name('password')
password.send_keys('password')
time.sleep(2)
subbut = driver.find_element_by_xpath("//input[@type='submit']")
subbut.click()
time.sleep(5)
subbut = driver.find_elements_by_xpath('//span[@class="Navbut"]')
subbut[1].click()
time.sleep(6)
subb = driver.find_elements_by_xpath("//a[@href]")[0]
subb.click()
time.sleep(4)
driver.get('http://akashsuper2000.github.io/faculty-dashboard')
time.sleep(5)
subbut = driver.find_elements_by_xpath('//span[@class="Navbut"]')
subbut[1].click()
time.sleep(6)
subb = driver.find_elements_by_xpath("//a[@href]")[1]
subb.click()
time.sleep(4)
driver.get('http://akashsuper2000.github.io/faculty-dashboard')
time.sleep(5)
subbut = driver.find_elements_by_xpath('//span[@class="Navbut"]')
subbut[1].click()
time.sleep(6)
subb = driver.find_elements_by_xpath("//a[@href]")[2]
subb.click()
print('Test Case Passed')
driver.quit()