Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #install
- sudo aptitude install firefoxdriver python-selenium
- #useage
- from selenium import webdriver
- #define driver- firefox, chrome or phantomjs etc.
- driver = webdriver.Firefox()
- #Open the url
- driver.get('https://www.google.com')
- #see how javascript simple alert is being executed
- driver.execute_script("alert('hello world');")
- #close the driver i.e. closing opened Firefox instance!
- driver.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement