首页 > 其他分享 >关于Selenium启动Chrome浏览器闪退问题

关于Selenium启动Chrome浏览器闪退问题

时间:2023-03-05 12:46:13浏览次数:69  
标签:浏览器 option Chrome Selenium 版本 闪退

两行代码有时候并不能解决问题

option=webdriver.ChromeOptions()
option.add_experimental_option(“detach”,True)

闪退的原因在保证webdriver版本和浏览器版本一致时,selenium版本有问题。

1.卸载当前selenium

 

 2.安装selenium4.1.1版本,完美解决

 

标签:浏览器,option,Chrome,Selenium,版本,闪退
From: https://www.cnblogs.com/accwiz/p/17180214.html

相关文章

  • selenium+python实例详解:邮箱登陆
    1、访问百度首页的selenium+python示例代码fromseleniumimportwebdriverimporttimedriver=webdriver.Ie()driver.get("http://www.baidu.com")time.sleep(10)driver.c......
  • selenium_webdriver(python)获取元素属性值,浏览器窗口控制、网页前进后退,title/url打
    <spanstyle="font-family:Arial,Helvetica,sans-serif;"><spanstyle="font-size:18px;">#coding:UTF-8#这句是为了声明编码格式,一定要有</span></span><spansty......
  • Chrome浏览器的跨域设置
    做前后端分离的开发的时候,出于一些原因往往需要将浏览器设置成支持跨域的模式,而且chrome浏览器支持可跨域的设置,但是新版本的chrome浏览器提高了跨域设置的门槛,原来的方法......
  • 解决cannot start chromeheadless
    jenkins里面是一台linuxagent机器然后我web部署,执行npmruntest:no-browser报错:cannotstartchromeheadlessjenkins解决方法:sudoyuminstallgtk3......
  • Linux + selenium + chromedriver
    1.安装selenium模块pip3installselenium2.安装Chromedriver2.1查看当前浏览器版本google-chrome--version注意:深度linux中chrome路径为/opt/apps/cn.googl......
  • seleniumUI自动化学习记录
    2019.2.9尝试了一个启动浏览器并打开指定网址的程序:这里首先要注意的就是浏览器的版本和seleniumjar包的版本必须符合才行,不然会报错2019.9.16必须要下载相应的chrome......
  • CentOS7 安装Chrome
    转载自:https://blog.csdn.net/ling1998/article/details/1239517261、权限若不是root权限,需要在root下执行为用户授权命令,我直接使用root登录2、下载[root@localhosts......
  • Python爬虫之用Selenium做爬虫
    我们在用python做爬虫的时候,除了直接用requests的架构,还有Scrapy、Selenium等方式可以使用,那么今天我们就来聊一聊使用Selenium如何实现爬虫。Selenium是什么?Selenium是......
  • 使用C#和Selenium将鼠标指针(光标)移动到特定位置或元素
    使用C#和Selenium将鼠标指针(光标)移动到特定位置或元素 我使用Selenium和C#执行单击操作。我可以执行点击操作,但我不能将鼠标指针(光标)移动到特定坐标或特定元素上。Ac......
  • Google Chrome Version 110 All In One
    GoogleChromeVersion110AllInOneGoogleChromeVersion110.0.5481.177(OfficialBuild)(x86_64)chrome://whats-new/效率边浏览,边利用侧边栏整理和标记重点......