问题:要切换的frame没有name或者id
解决:使用嵌套的element定位就可以了
driver.switchTo().frame(driver.findElement(By.cssSelector("td.aui_main > div > iframe")));//切换tab的frame
参考:http://stackoverflow.com/questions/20069737/how-to-identify-and-switch-to-the-frame-in-selenium-webdriver-when-frame-does-no
没有评论:
发表评论