51Testing软件测试论坛
标题:
Day2-5测试积点任务
[打印本页]
作者:
测试积点老人
时间:
2018-8-13 15:12
标题:
Day2-5测试积点任务
问题:
switch_to.frame()进入frame会报错
要操作的元素截图如下:
[attach]117954[/attach]
我想点击“游戏用户”,但是用switch_to.frame()进入frame就会报错
我的代码:
fr_1=driver.find_elements_by_xpath("//frame[@name='topFrame']")
driver.switch_to.frame(fr_1)
报错信息:
Traceback (most recent call last):
File "C:\Users\CT\Desktop\Python\AdminWeb.py", line 42, in <module>
LoginTest.gameyonghu()
File "C:\Users\CT\Desktop\Python\AdminWeb.py", line 36, in gameyonghu
driver.switch_to.frame(fr_1)
File "C:\Python35\lib\site-packages\selenium\webdriver\remote\switch_to.py", line 87, in frame
self._driver.execute(Command.SWITCH_TO_FRAME, {'id': frame_reference})
File "C:\Python35\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "C:\Python35\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchFrameException: Message: frame id has unexpected type
复制代码
作者:
libingyu135
时间:
2018-8-14 11:38
没定义frame id ?
作者:
qqq911
时间:
2018-8-14 12:52
frame id 的类型定义有问题
作者:
jingzizx
时间:
2018-8-14 13:14
frame id 有问题
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2