Skip to content Skip to sidebar Skip to footer

How To Access Frame With Python Selenium

I am trying to fill a form on an html page that I believe is contained within a frame. The relevant portion of the html looks like this:

Solution 1:

I could be wrong but as far as I know you can use driver.switch_to_frame(selector) only if selector is an element id. In your case try to use following:

driver.switch_to_frame(driver.find_element_by_xpath('//frame[@src="fr4_top.jhtml?NUM1=1462489510565"]'))

Post a Comment for "How To Access Frame With Python Selenium"