{{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:

Windows 8.3 file naming setting is disabled for the product

To enable Windows 8.3 file naming setting use fsutil command Example:  c:\> fsutil 8dot3name set C: 0