Button Clicked But Nothing Happens On Webpage(selenium Webdriver)
I am trying to click to 'Get Data' button on this website. https://www1.nseindia.com/products/content/derivatives/currency/archieve_cd.htm Here's my code. I have solved some of the
Solution 1:
url = "https://www1.nseindia.com/archives/cd/bhav/CD_Bhavcopy050121.zip"
driver.get(url)
You delete all the rest of the code that exists after this.
driver.find_element_by_xpath("//select[@name='h_filetype']/option[text()='Daily Bhavcopy']").click()
driver.find_element_by_id("date").send_keys('05-01-2021')
time.sleep(2)
driver.find_element_by_id("date").send_keys(Keys.ESCAPE)
time.sleep(2)
element = driver.find_element_by_css_selector('[class="getdata-button"]').click()
This is the code that you don't need.
And if you want to make it to Auto Download more data try to make a code that will generate the calendar days and place them here CD_Bhavcopy050121.zip
So when you will want to extract the data from 05/01/2019
you will have to change the part of the html
to this CD_Bhavcopy050119.zip
Post a Comment for "Button Clicked But Nothing Happens On Webpage(selenium Webdriver)"