Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # prior to running this run `pip install -U selenium`
- from selenium import webdriver
- # create a new Chrome session
- driver = webdriver.Chrome()
- driver.implicitly_wait(10)
- # Navigate to the application home page
- driver.get("https://www.google.com")
- # get the search textbox
- search_field = driver.find_element_by_name("q")
- search_field.clear()
- # enter search keyword and submit
- search_field.send_keys("cats")
- search_field.submit()
- # close the browser window
- driver.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement