Skip to content

Instantly share code, notes, and snippets.

@ganigithub
Last active July 7, 2022 05:56
Show Gist options
  • Save ganigithub/0c8b56a6ff6dde6ef0caf01cd1257f57 to your computer and use it in GitHub Desktop.
Save ganigithub/0c8b56a6ff6dde6ef0caf01cd1257f57 to your computer and use it in GitHub Desktop.
def stock_1(self, driver):
"""
This function finds BankNifty future and gets its chart
"""
#marketwatch
sleep(1)
driver.find_element_by_xpath("/html/body/div[1]/div[1]/div/div/div[1]/a[1]/span").click()
sleep(1)
#click on banknifty
driver.find_element_by_xpath('//*[@id="app"]/div[2]/div/div/div/div[2]/div/div[1]/div/div/span[1]/span/span').click()
sleep(1)
#click on chart
driver.find_element_by_xpath('/html/body/div[1]/div[2]/div/div/div/div[2]/div/div[1]/div/div[2]/ul/li[4]/ul/li[3]/a').click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment