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

Generate Insert Sql from Select Statement

SELECT 'INSERT INTO ReferenceTable (ID, Name) VALUES (' +        CAST(ID AS NVARCHAR) + ', ''' + Name + ''...