鱼C论坛

 找回密码
 立即注册
查看: 2896|回复: 3

[已解决]python 报错了,看不懂报错信息

[复制链接]
发表于 2015-12-31 14:31:52 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. Traceback (most recent call last):
  2.   File "E:\selenium_python\login_test.py", line 127, in <module>
  3.     login_test(ele_dict,uesr_list)
  4.   File "E:\selenium_python\login_test.py", line 104, in login_test
  5.     sendVals(ele_tuple,arg)
  6.   File "E:\selenium_python\login_test.py", line 36, in sendVals
  7.     eletuple[i].send_keys('')
  8.   File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webelement.py", line 328, in send_keys
  9.     self._execute(Command.SEND_KEYS_TO_ELEMENT, {'value': typing})
  10.   File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webelement.py", line 454, in _execute
  11.     return self._parent.execute(command, params)
  12.   File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 201, in execute
  13.     self.error_handler.check_response(response)
  14.   File "C:\Python34\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 181, in check_response
  15.     raise exception_class(message, screen, stacktrace)
  16. selenium.common.exceptions.StaleElementReferenceException: Message: Element not found in the cache - perhaps the page has changed since it was looked up
  17. Stacktrace:
  18.     at fxdriver.cache.getElementAt (resource://fxdriver/modules/web-element-cache.js:9351)
  19.     at Utils.getElementAt (file:///C:/Users/ADMINI~1/AppData/Local/Temp/tmpp9gb5n3b/extensions/fxdriver@googlecode.com/components/command-processor.js:8978)
  20.     at fxdriver.preconditions.visible (file:///C:/Users/ADMINI~1/AppData/Local/Temp/tmpp9gb5n3b/extensions/fxdriver@googlecode.com/components/command-processor.js:9979)
  21.     at DelayedCommand.prototype.checkPreconditions_ (file:///C:/Users/ADMINI~1/AppData/Local/Temp/tmpp9gb5n3b/extensions/fxdriver@googlecode.com/components/command-processor.js:12517)
  22.     at DelayedCommand.prototype.executeInternal_/h (file:///C:/Users/ADMINI~1/AppData/Local/Temp/tmpp9gb5n3b/extensions/fxdriver@googlecode.com/components/command-processor.js:12534)
  23.     at DelayedCommand.prototype.executeInternal_ (file:///C:/Users/ADMINI~1/AppData/Local/Temp/tmpp9gb5n3b/extensions/fxdriver@googlecode.com/components/command-processor.js:12539)
  24.     at DelayedCommand.prototype.execute/< (file:///C:/Users/ADMINI~1/AppData/Local/Temp/tmpp9gb5n3b/extensions/fxdriver@googlecode.com/components/command-processor.js:12481)
复制代码
最佳答案
2016-1-6 13:19:55
三木 发表于 2016-1-4 09:00
我设置了登录两次,第一次密码错误后,页面会刷新,然后输入第二次的时候,找不到元素

建议先实际登录一下用浏览器抓包看一下流程,再写代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2015-12-31 20:53:46 | 显示全部楼层
看样子是登录出错了.发核心代码看看~
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-1-4 09:00:11 | 显示全部楼层
hldh214 发表于 2015-12-31 20:53
看样子是登录出错了.发核心代码看看~

我设置了登录两次,第一次密码错误后,页面会刷新,然后输入第二次的时候,找不到元素
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2016-1-6 13:19:55 | 显示全部楼层    本楼为最佳答案   
三木 发表于 2016-1-4 09:00
我设置了登录两次,第一次密码错误后,页面会刷新,然后输入第二次的时候,找不到元素

建议先实际登录一下用浏览器抓包看一下流程,再写代码
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-2-19 01:05

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表