Reputation: 47
So recently I came across this error and get around it. I have selenium set up in a way that a user enters text and the search bar on https://www.dukascopy.com/trading-tools/widgets/quotes/historical_data_feed displays the data however I can't click the result with my code.
Upvotes: 0
Views: 156
Reputation: 496
Here we go. The search bar needed to be toggled through a button click.
... # Driver initialization, navigating to the page etc.
# The first nested frame
frame_1 = driver.find_element_by_id("widget-container")
driver.switch_to.frame(frame_1)
# The second nested frame
frame_2 = driver.find_element_by_tag_name("iframe")
driver.switch_to.frame(frame_2)
# Toggling the search bar
driver.find_element_by_xpath("//div[contains(text(), 'Instrument')]").click()
# Actually sending in the query
search = driver.find_element_by_xpath("//input[@placeholder='Instrument']")
search.send_keys("Hey there!")
Upvotes: 2