Created
June 22, 2016 10:19
-
-
Save talktokets/d02b50ebec3b56cfae011e52a3fab576 to your computer and use it in GitHub Desktop.
This file contains 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.clear() | |
elem.send_keys("pycon") | |
elem.send_keys(Keys.RETURN) | |
assert "No results found." not in driver.page_source | |
driver.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment