Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- from selenium import webdriver
- from selenium.webdriver.common.keys import Keys
- from selenium.webdriver.support.ui import Select
- driver = webdriver.Chrome()
- driver.get("https://se.timeedit.net/web/liu/db1/wr_stud/")
- assert "TimeEdit" in driver.title
- loginTimeEdit = driver.find_element_by_id('logincontrol')
- loginTimeEdit.click()
- loginLisamUsername = driver.find_element_by_id('userNameInput')
- loginLisamUsername.send_keys("ponte582")
- loginLisamPassword = driver.find_element_by_id('passwordInput')
- loginLisamPassword.send_keys("")
- loginLisamClick = driver.find_element_by_id('submitButton')
- loginLisamClick.click()
- chooseStudentBokning = driver.find_element_by_xpath('//*[@id="contents"]/div[3]/div/div[1]/a[1]/div/span[1]/span')
- chooseStudentBokning.click()
- chooseOnlyAvailable = driver.find_element_by_xpath('//*[@id="contents"]/div[2]/table/tbody/tr/td[2]/label')
- chooseOnlyAvailable.click()
- chooseStart = driver.find_element_by_xpath('//*[@id="contents"]/div[2]/table/tbody/tr/td[3]/div/select[1]/option[4]')
- chooseStart.click()
- chooseEnd = driver.find_element_by_xpath('//*[@id="contents"]/div[2]/table/tbody/tr/td[4]/div/select[1]/option[8]')
- chooseEnd.click()
- close.driver()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement