当前位置: 首页 > news >正文

Linux+Selenium

Selenium+Linux

开源社区已无CentOS7.0以下rpm维护。升级测试机器到CentOS7.X。

Selenium安装

python环境:pip3 install selenium

浏览器插件:http://chromedriver.storage.googleapis.com/index.html

yum instlal google-chrome

使用以下命令确定是否安装成功,显示以下信息表示安装成功

google-chrome-stable --no-sandbox --headless --disable-gpu --screenshot 百度一下,你就知道

yum install chromedriver.x86_64

也可携带chrome driver,单独运行chrome drive报successfully说明安装成功。

运行遇到问题

selenium调用Chromedriver:

  1. The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.

单独调试google-chrome,看是否可单独启动。

2、ERROR:ozone_platform_x11.cc(234)] Missing X server or $DISPLAY

/usr/bin/google-chrome
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
[14590:14590:0310/170706.251474:ERROR:ozone_platform_x11.cc(234)] Missing X server or $DISPLAY
[14590:14590:0310/170706.251535:ERROR:env.cc(225)] The platform failed to initialize. Exiting.

http://www.lryc.cn/news/91929.html

相关文章:

  • 2023-06-01 LeetCode每日一题(礼盒的最大甜蜜度)
  • Spring架构篇--2.7.2 远程通信基础--Netty原理--ServerBootstrap
  • awk编辑器
  • DicomObjects.Core 3.0.17 Crack
  • 电脑怎么通过网络传输文件?
  • 人工智能之深度学习
  • 性能测试设计阶段
  • leetCode !! word break
  • 基础学习——关于list、numpy、torch在float和int等数据类型转换方面的总结
  • 华纳云美国Linux服务器常用命令分享
  • 【minio】8.x版本与SpringBoot版本不兼容报错
  • 如何用chatGPT赚钱?
  • 【Go编程语言】流程控制
  • Sql Server 自动备份
  • ThreadLocal的应用
  • 中值滤波_中值滤波原理
  • day15 - 使用图像金字塔进行图像拼接
  • 算法修炼之筑基篇——筑基一层初期(解决01背包问题)
  • JVM的空间结构
  • 图像分割的常用算法
  • AI歌手真的可以吗
  • Kubernetes高级存储
  • 云原生之使用Docker部署docker-compose-ui工具
  • 文心一言 vs GPT4
  • Tcl-5. format 命令
  • BloombergGPT: 首个金融垂直领域大语言模型
  • CMake深度解析:掌握add_custom_command,精通Makefile生成规则
  • 基于Yolov5目标检测的物体分类识别及定位(二) -- yolov5运行环境搭建及label格式转换
  • Office project 2019安装
  • 【leetcode-mysql】1251. 平均售价