Created
June 13, 2019 14:07
-
-
Save rpaskin/d72d2e3a670dc4c875a0e8b153e98bb2 to your computer and use it in GitHub Desktop.
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.Chrome() | |
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