首页 > 其他分享 >selenium报错result.webdriverValue.value

selenium报错result.webdriverValue.value

时间:2023-11-14 10:46:23浏览次数:26  
标签:webdriver chrome selenium find 报错 result response

1. 示例代码

from selenium import webdriver

driver = webdriver.Chrome()
driver.get('http://124.223.30.31:xxx/forum.php')
driver.find_element('id','ls_username').send_keys('admin')

端口我匿了

这个代码是没有问题的,任意其他代码在当前的环境下都是会出现这个错误的

2. 报错

从下面的报错可以看到在find_element的时候出错了,而这个代码以前是ok的

核心的出错提示selenium.common.exceptions.WebDriverException: Message: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response

闻所未闻哈~

Traceback (most recent call last):
  File "D:\demo.py", line 11, in <module>
    driver.find_element('id','ls_username').send_keys('admin')
  File "D:\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 856, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "D:\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 434, in execute
    self.error_handler.check_response(response)
  File "D:\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response
  (Session info: chrome=119.0.6045.124)
Stacktrace:
	...(省去几百字)

3. 搜

匹配的结果不多,倒还有

https://github.com/SeleniumHQ/selenium/issues/13084

原来是驱动版本的问题

4. 环境

当前环境:

chrome version:119.0.6045.124 (正式版本) (64 位) (cohort: Stable) 
chromedriver version:  118.0.5993.70
selenium:4.3.0

更新下驱动https://googlechromelabs.github.io/chrome-for-testing/

https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/win64/chromedriver-win64.zip

下载替换,再次运行搞定

标签:webdriver,chrome,selenium,find,报错,result,response
From: https://www.cnblogs.com/wuxianfeng023/p/17831073.html

相关文章

  • electron 打包报错
     下载链接:https://npm.taobao.org/mirrors/electron/ ......
  • 软件测试|使用selenium实现文件上传
    简介文件上传是我们web自动化测试工作中经常使用的场景,selenium同样也是支持我们实现自动化的文件上传操作,本文就来给大家介绍一下selenium如何实现自动化文件上传。input标签文件上传一般情况下,文件上传的按钮是一个<input>标签,并且附带的type属性为file,这样的标签我们可以使用sen......
  • Python selenium Chrome正在受到自动软件的控制 disable-infobars无效 的解决方法
    问题解决前两天更新了google浏览器版本,今天运行以前的脚本,发现options一个参数的配置不生效了。运行了几次都发现该参数没有生效,也检查了自己的代码参数,没有写错,于是就有了这一波“网中寻求答案”的操作。苦寻不易,还真就找到了答案,详细可参见该地址的答案:https://help.applitoo......
  • ubuntu:python:编译安装过程中的报错(python 3.12/ubuntu 23.10)
    一,参考文档:https://devguide.python.org/getting-started/setup-building/#install-dependencies主要是补充python所需依赖的开发库,如果这些库未安装,则在安装python的过程中就会报出下面所列的错误,安装依赖库的命令:ubuntu如下:sudoapt-getinstallbuild-essentialgdbl......
  • finalshell报错java.net.UnknownHostException: node2
    前几天是node3连不上,今天早上写作业发现node2又连不上了]$systemctlstatusnetwork.service●network.service-LSB:Bringup/downnetworkingLoaded:loaded(/etc/rc.d/init.d/network;bad;vendorpreset:disabled)Active:active(exited)since二2023-11-1408:......
  • 在created等虚拟DOM没有完成挂载的钩子函数中,避免操作DOM报错可以把操作语句放在$next
    在created等虚拟DOM没有完成挂载的钩子函数中,避免操作DOM报错可以把操作语句放在$nextTick的回调函数中在组件内使用vm.$nextTick()实例方法特别方便,因为它不需要全局Vue,并且回调函数中的this将自动绑定到当前的Vue实例上需要使用$nextTick()原因是Vue是异步渲染$nextTick()返......
  • ES安装报错
    1.配置了日志启动失败由于权限问题导致启动失败,原因是我在elasticsearch/conf/elasticsearch.yml中设置了path.data和path.logs,ES启动建议使用普通用户启动,root权限过大,初期未给path.data和path.logs设置普通用户属组,导致启动失败。需要给配置的日志路劲设置用户组chown-Res......
  • selenium和playwright的区别和使用方法
    Selenium和Playwright都是自动化测试工具,可以用于模拟用户操作、执行测试脚本、验证网站功能和性能等。它们的主要区别在于实现方式和功能特性。1.实现方法Selenium是基于浏览器驱动的自动化测试工具,支持多种编程语言和多种浏览器。Selenium通过启动浏览器驱动程序(如Chrome......
  • mysql中插入emoji报错
    因为项目使用了微信登录,所以会拉取微信用户信息保存到本地数据库中,以前一直没啥问题,今天有个用户就是登不上,其他人都是可以正常登录的,结果查了一下发现他的用户名称有emiji,解决办法还算挺多的1.将数据库的utf8编码转换成utf8mb4的编码2.判断emoj进行阶段,只取汉字3.第三方依赖包......
  • pip下载python软件包时报错 Could not find a version that satisfies the requiremen
    pip下载python软件包时报错,使用了国内源等各种方法,后来才知道是电脑中打开了抓包工具;打开抓包工具后一定要关闭抓包工具,这样下载软件包就下载下来了关闭抓包工具后,下载成功了......