Last active
June 14, 2023 23:18
-
-
Save wildaces215/edaa900c5449bf30671efb9a2187d372 to your computer and use it in GitHub Desktop.
Quick selenium script
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 | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.chrome.options import Options | |
| import time | |
| options = Options() | |
| options.headless = True | |
| driver = webdriver.Firefox() | |
| driver.get("https://www.google.com") | |
| time.sleep(2) | |
| driver.find_element(By.ID,"APjFqb").send_keys("AAPL") | |
| time.sleep(2) | |
| driver.find_element(By.CSS_SELECTOR,".FPdoLc > center:nth-child(1) > input:nth-child(1)").send_keys(Keys.ENTER) | |
| driver.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment