import time from selenium import webdriver driver = webdriver.Chrome(executable_path=r"C:\Chrome\chromedriver.exe") driver.get('https://myportal.vtc.edu.hk') cna = /* Your Student Number */ pw = /* Your Password */ line1 = driver.find_element_by_name('userid') line1.click() time.sleep(0.1) line1.send_keys(cna) time.sleep(0.1) line2 = driver.find_element_by_name('password') line2.click() time.sleep(0.1) line2.send_keys(pw) time.sleep(0.5) submit = driver.find_element_by_id('submitBtn') submit.click() time.sleep(1) timetable = driver.find_element_by_link_text('Timetable') timetable.click()