-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbrightspace.py
More file actions
30 lines (22 loc) · 863 Bytes
/
brightspace.py
File metadata and controls
30 lines (22 loc) · 863 Bytes
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
from selenium import webdriver
# from selenium.webdriver.opera.options import Options
URL1 = 'url1'
URL2 = 'url2'
driver = webdriver.Opera()
driver.get(URL1)
userbox = driver.find_element_by_xpath('//*[@id="userNameInput"]')
userbox.send_keys('god@universitymail.ca')
passbox = driver.find_element_by_xpath('//*[@id="passwordInput"]')
passbox.send_keys('abc123')
loginLink = driver.find_element_by_xpath('//*[@id="submitButton"]')
loginLink.click()
# driver.implicitly_wait(1)
driver.get(URL2)
loginLink = driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[4]/div[2]/div/div/a[2]')
loginLink.click()
res = 1
while res < 15:
owl = driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[4]/div[2]/div/div/a[2]')
owl.click()
driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[4]/div[2]/div/div/a[2]').click()
res = res + 1