How to select a frame using selenium?

前端 未结 5 569
清酒与你
清酒与你 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 17:07

    driver.switchTo().defaultContent();
    driver.switchTo().frame(driver.findElement(By.xpath("//iframe[contains(@src,'FUN_UnitList_FilterByLevelIndexOne')]")));
    

提交回复
热议问题