Python with selenium: unable to locate element which really exist

后端 未结 2 1943
渐次进展
渐次进展 2020-12-08 04:25

I\'ve been trying fill input:



        
2条回答
  •  误落风尘
    2020-12-08 05:32

    The problem is that your input tag is inside an iframe, you need to switch to it first:

    frame = driver.find_element_by_xpath('//frame[@name="main"]')
    driver.switch_to.frame(frame)
    pass1 = driver.find_element_by_id("PASSFIELD1")
    

提交回复
热议问题