I'm trying to click on an element on this page:
url = 'https://finance.yahoo.com/quote/GOOG?ltr=1'
driver = webdriver.Firefox()
driver.get(url)
driver.find_element_by_link_text('Financials')
This instant I want to click on buttons like 'Cash Flow', or 'Balance Sheet', or 'Quarterly'. I'm aware that these by now these are loaded as I manually extracted them using BeautifulSoup by performing a page source. But when I try the same using Selenium, I'm out of luck.
driver.find_element_by_link_text('Cash Flow')
driver.find_element_by_link_text('Balance Sheet')
driver.find_element_by_link_text('Quarterly')
Every line here returns 'Unable to locate element' besides 'Quarterly'. This returns an element but its not the one I want. I guess its because of choosing the wrong iframe, and I have located all iframes:
driver.find_elements_by_tag_name('iframe')
This returns 9 elements. But, I'm not able to figure out the iframe of the element that I need to click on. I also went through the iframes sequentially and still couldn't find the elements I'm interested in.