Created
July 18, 2014 13:16
-
-
Save tonetheman/2c95b324d3a9bc9fcd9f to your computer and use it in GitHub Desktop.
selenium-example-1 to show how to use driver find element and python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium import webdriver | |
| from selenium.webdriver.common.keys import Keys | |
| driver = webdriver.Firefox() | |
| driver.get("http://www.python.org") | |
| assert "Python" in driver.title | |
| elem = driver.find_element_by_name("q") | |
| elem.send_keys("selenium") | |
| elem.send_keys(Keys.RETURN) | |
| driver.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment