Title / Description
Code from selenium import webdriver import getpass driver = webdriver.Firefox() driver.get('https://myaccount.lib.ncsu.edu/') user = driver.find_element_by_name('user_idp') for option in user.find_elements_by_tag_name('option'): if option.text == 'NC State Unity Users': option.click() user.submit() user = driver.find_element_by_id('j_username') username_input = raw_input("Type in your username: ") user.send_keys(username_input) passw = driver.find_element_by_id('j_password') password_input = getpass.getpass("Type in your password: ") passw.send_keys(password_input) passw.submit() driver.get('https://myaccount.lib.ncsu.edu/account/checkedout') for tags in driver.find_elements_by_tag_name('a'): if tags.get_attribute('title')[:5] == 'renew': print tags.get_attribute('title') tags.click()
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code