How to select a frame using selenium?

前端 未结 5 584
清酒与你
清酒与你 2020-12-19 16:40

I\'m using Java to create selenium test cases. My system is based on portlets connected to each other. I\'m using \"selectFrame\" command to select the portlet.

I tr

5条回答
  •  长情又很酷
    2020-12-19 16:47

    I was able to select an "src" frame with no name or ID using this method & Python Selenium. I found the xpath of the element, and did this code to get selenium to select the frame properly (using Python 2.7):

    driver.switch_to.frame(driver.find_element_by_xpath('//*[@id="Detail-innerCT"]/iframe'))
    

提交回复
热议问题