51Testing软件测试论坛

标题: selenium:Driver class not found: com.opera.core.systems.OperaDriver [打印本页]

作者: 米老头呢    时间: 2016-11-1 17:01
标题: selenium:Driver class not found: com.opera.core.systems.OperaDriver
用命令行运行selenium 程序是火狐浏览器有打开,但是脚本没运行,下面是那个报错信息
其中有俩行是提示operaDriver没有找到
10:06:41.014 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:06:41.014 INFO - Driver provider com.opera.core.systems.OperaDriver is not re
gistered

具体信息:
E:\Program Files\selenium-2.53.0>java -jar selenium-server-standalone-2.53.0.jar
-port 4445 -htmlSuite *firefox http://sku-web.scm.qa.qeeka.com/ C:\Users\joy.zh
ang\Desktop\scm\creat.html C:\Users\joy.zhang\Desktop\scm\result.html
10:06:40.903 INFO - Launching a standalone Selenium Server
10:06:40.963 INFO - Java: Oracle Corporation 25.91-b15
10:06:40.963 INFO - OS: Windows 7 6.1 amd64
10:06:40.972 INFO - v2.53.0, with Core v2.53.0. Built from revision 35ae25b
10:06:41.014 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:06:41.014 INFO - Driver provider com.opera.core.systems.OperaDriver is not re
gistered
10:06:41.020 INFO - Driver provider org.openqa.selenium.safari.SafariDriver regi
stration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=
MAC}] does not match the current platform VISTA
10:06:41.021 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUni
tDriver
10:06:41.021 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver
is not registered
jar:file:/E:/Program%20Files/selenium-2.53.0/selenium-server-standalone-2.53.0.j
ar!/customProfileDirCUSTFFCHROME
10:06:41.230 INFO - Launching Firefox...
作者: 清晨一缕阳光    时间: 2016-11-1 21:21
命令行运行selenium脚本的时候貌似是要设置环境变量的,把需要的jar包加入path路径中;我记得有个帖子好像是关于命令行运行selenium脚本的东西,暂时没有找到;具体的可以在百度中再找找。
作者: 米老头呢    时间: 2016-11-2 11:27
清晨一缕阳光 发表于 2016-11-1 21:21
命令行运行selenium脚本的时候貌似是要设置环境变量的,把需要的jar包加入path路径中;我记得有个帖子好像 ...

百度了下说跟selenium rc启动是通过代理浏览器启动的,所以要设置下代理服务器,然后火狐浏览器要特别加一个参数-firefoxProfileTemplate(火狐的配置文件)

E:\Program Files\selenium-2.53.0>java -classpath E:\build\selenium-2.53.0\seleni
um-server.jar -jar selenium-server-standalone-2.53.0.jar -port 4444 -firefoxProf
ileTemplate C:\Users\Default\AppData\Roaming\Mozilla\Firefox\Profiles\cuef0kql.w
ebdriver_profile -htmlSuite *firefox http://sku-web.scm.qa.qeeka.com/ C:\Users\j
oy.zhang\Desktop\scm\creat.html C:\Users\joy.zhang\Desktop\scm\result.html
11:12:04.431 INFO - Launching a standalone Selenium Server
11:12:04.490 INFO - Java: Oracle Corporation 25.91-b15
11:12:04.490 INFO - OS: Windows 7 6.1 amd64
11:12:04.498 INFO - v2.53.0, with Core v2.53.0. Built from revision 35ae25b
11:12:04.538 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:12:04.539 INFO - Driver provider com.opera.core.systems.OperaDriver is not re
gistered
11:12:04.545 INFO - Driver provider org.openqa.selenium.safari.SafariDriver regi
stration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=
MAC}] does not match the current platform VISTA
11:12:04.546 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUni
tDriver
11:12:04.547 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver
is not registered
jar:file:/E:/Program%20Files/selenium-2.53.0/selenium-server-standalone-2.53.0.j
ar!/customProfileDirCUSTFFCHROME
11:12:05.144 INFO - Launching Firefox...
作者: 米老头呢    时间: 2016-11-2 11:44
米老头呢 发表于 2016-11-2 11:27
百度了下说跟selenium rc启动是通过代理浏览器启动的,所以要设置下代理服务器,然后火狐浏览器要特别加 ...

我这样弄完之后脚本也是没运行




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2