Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python 2.7.5 (default, Oct 11 2015, 17:47:16)
- [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>>
- [hkeyland@localhost Escritorio]$ python testa.py
- from selenium import webdriver
- from selenium.webdriver.common.action_chains import ActionChains
- from selenium.webdriver.common.action_chains import ActionChains
- from selenium.webdriver.common.keys import Keys
- ########################################
- """USER AUTH"""
- username="user"
- password="password"
- ########################################
- ########################################
- """LOGIN"""
- driver = webdriver.Firefox()
- driver.set_window_size(1024,800)
- driver.get("https://www_hackthissite_org/missions/prog/2/index.php")
- element = driver.find_element_by_name('username')
- element.send_keys(username)
- element2 = driver.find_element_by_name("password")
- element2.send_keys(password)
- element3 = driver.find_element_by_name("btn_submit")
- element3.click()
- ########################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement