{{theTime}}

Search This Blog

Total Pageviews

Selenium

Python Selenium Automation - Fetch the Stock Price from Yahoo using Python and Selenium

* Install Python to run the below program

FetchStockPrice.py

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
browser = webdriver.Chrome()
browser.get('https://finance.yahoo.com/')
elem = browser.find_element_by_id('header-desktop-search-button')  # Find the search box
searchText = browser.find_element_by_xpath("//*[@id='yfin-usr-qry']"
searchText.send_keys ('AMZN')
searchText.send_keys (Keys.RETURN)
browser.implicitly_wait(10)
browser.quit()

No comments:

Git checkout Flutter projects not able to run in Android Studio

Resolution: Set the Flutter SDK Path -  File>Settings(Ctrl+Alt+S). In 'Languages & Frameworks'> Run "Packages get&quo...