我尝试在帧之间切换,就像我使用IE,SA,CH,FF网络驱动程序一样, 但是我正在尝试使用歌剧:
driver.switchTo().defaultContent();
WebElement frame = driver.findElement(By.xpath("something"));
driver.switchTo().frame(frame);
它在driver.switchTo().frame(frame)
失败,结果异常是:
org.openqa.selenium.NoSuchFrameException: Invalid frame index 4
Build info: version: '2.32.0', revision: '6c40c187d01409a5dc3b7f8251859150c8af0bcb', time: '2013-04-09 10:39:28'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_10'
Driver info: driver.version: unknown
希望得到答案, 感谢
答案 0 :(得分:0)
答案 1 :(得分:0)
我试过了,我得到了这个:
org.openqa.selenium.NoSuchFrameException: Invalid frame index 4
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:12:12'
System info: host: 'demosaar', ip: '192.0.16.63', os.name: 'Windows 7', os.arch: 'x86',
os.version: '6.1', java.version: '1.7.0_10'
Driver info: driver.version: unknown
答案 2 :(得分:0)
请参考这个,希望它会有所帮助: http://selenium-python.readthedocs.org/en/latest/api.html