Skip to content

Instantly share code, notes, and snippets.

@FrenchTechLead
Created March 18, 2021 12:59
Show Gist options
  • Save FrenchTechLead/3b19a60eb3a5bf16f3bc308081d530a8 to your computer and use it in GitHub Desktop.
Save FrenchTechLead/3b19a60eb3a5bf16f3bc308081d530a8 to your computer and use it in GitHub Desktop.
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("https://www.wikipedia.org/")
searchInput = driver.find_element_by_name("search")
searchInput.clear()
searchInput.send_keys("selenium software")
sleep(2)
searchInput.send_keys(Keys.ARROW_DOWN)
searchInput.send_keys(Keys.RETURN)
sleep(3)
driver.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment