Testing Selenium远程配置问题

Testing Selenium远程配置问题,testing,selenium-webdriver,automated-tests,tdd,selenium-chromedriver,Testing,Selenium Webdriver,Automated Tests,Tdd,Selenium Chromedriver,我明白了。错误和不理解缺少的部分 在nod和chromedriver上安装了chrome 使用Chrome驱动程序进行测试 消息:测试方法SeleniumGridSmokeTest.UnitTest1.TestMethod1抛出 异常:System.InvalidOperationException:无法创建新的 服务:ChromeDriverService构建信息:版本:“3.6.0”,修订版: “6fbf3ec767”,时间:“2017-09-27T16:15:40.131Z”系统信息:主

我明白了。错误和不理解缺少的部分

在nod和chromedriver上安装了chrome

使用Chrome驱动程序进行测试

消息:测试方法SeleniumGridSmokeTest.UnitTest1.TestMethod1抛出 异常:System.InvalidOperationException:无法创建新的 服务:ChromeDriverService构建信息:版本:“3.6.0”,修订版: “6fbf3ec767”,时间:“2017-09-27T16:15:40.131Z”系统信息:主机: 'seleniumnode',ip:'10.0.0.9',os.name:'Linux',os.arch:'amd64', os.version:'4.4.0-97-generic',java.version:'1.8.0_151'驱动程序信息: driver.version:未知(不安全证书)

使用Firefox驱动程序进行测试

[5:18]信息:测试方法 SeleniumGridSmokeTest.UnitTest1.TestMethod1引发异常: System.InvalidOperationException:无法创建新服务: GeckoDriverService构建信息:版本:“3.6.0”,修订版: “6fbf3ec767”,时间:“2017-09-27T16:15:40.131Z”系统信息:主机: 'seleniumnode',ip:'10.0.0.9',os.name:'Linux',os.arch:'amd64', os.version:'4.4.0-97-generic',java.version:'1.8.0_151'驱动程序信息: driver.version:未知(不安全证书)

以下是我创建selenium远程服务器的步骤

答:我在谷歌云中创建了两个ubuntu框。 **

  • 一个用于服务器
  • 一个用于节点
B.在两台机器上安装java(检查java版本)

C.下载Selenium-server-standalone-3.6.0.jar wget“” D.运行hub命令 java-jar Selenium-server-standalone-3.6.0.jar-role hub

E.运行node命令

java-Dwebdriver.chrome.driver=chromedriver.exe-jar selenium-server-standalone-3.6.0.jar-role节点-hub

D.看到控制台的屏幕

配置信息

浏览器超时:0 调试:false 帮助:错误 港口:5555 角色:节点 超时:1800 enablePassThrough:true 清理周期:5000 主持人:10.0.0.9 最大课时:5 能力:能力[{seleniumProtocol=WebDriver,browserName=chrome,maxInstances=5,platform=LINUX}] 功能:功能[{seleniumProtocol=WebDriver,browserName=firefox,maxInstances=5,platform=LINUX}] 能力:能力[{seleniumProtocol=WebDriver,browserName=internetexplorer,maxInstances=1,platform=LINUX}] 下行限值:2 枢纽: 身份证件: hubHost:51.141.24.51 休波特:4444 点名:5000 nodeStatusCheckTimeout:5000 代理:org.openqa.grid.selenium.proxy.DefaultRemoteProxy 登记:对 注册周期:5000 远程主机: 未注册的StillDownAfter:60000

呼叫码

这些是我应用程序中的包

集线器日志

2017-11-01 17:00:17.120:INFO:osjs.Server:main:Started@985ms 17:00:17.121信息-节点应注册到 17:00:17.121信息-硒网格 集线器已启动并正在运行17:08:48.736信息-已注册节点 17:15:14.628信息-收到创建新文件的请求 会话:功能[{browserName=chrome,platformName=ANY, version=,platform=ANY}]17:15:14.628信息-正在尝试创建新的 测试插槽{seleniumProtocol=WebDriver,browserName=chrome, maxInstances=5,platform=LINUX}17:17:47.972信息-收到请求 创建新会话:功能[{AcceptSecureCerts=true, browserName=firefox}]17:17:47.973信息-正在尝试创建新的 测试槽{seleniumProtocol=WebDriver,browserName=firefox, maxInstances=5,platform=LINUX}17:18:15.651信息-收到请求 创建新会话:功能[{AcceptSecureCerts=true, browserName=firefox}]17:18:15.651信息-正在尝试创建新的 测试槽{seleniumProtocol=WebDriver,browserName=firefox, maxInstances=5,platform=LINUX}

节点日志

17:17:48.015信息-功能{AcceptInsureCerts=true, browserName=firefox,}匹配的类 org.openqa.selenium.remote.server.ServicedSession$Factory(提供程序: org.openqa.selenium.firefox.GeckoDriverService)17:17:48.015信息- 功能{AcceptSecureCerts=true,browserName=firefox,}匹配 类org.openqa.selenium.remote.server.ServicedSession$Factory (提供者:org.openqa.selenium.chrome.ChromeDriverService) 17:18:15.649信息-将默认提供程序绑定到: org.openqa.selenium.chrome.ChromeDriverService 17:18:15.650信息- 找到的处理程序: org.openqa.selenium.remote.server.commandhandler。BeginSession@77bf54a0 17:18:15.650信息-/session:在/session上执行POST(处理程序: BeginSession)17:18:15.651信息-功能包括:功能 {AcceptInsureCerts=true,browserName=firefox,}17:18:15.651信息- 功能{AcceptSecureCerts=true,browserName=firefox,}匹配 类org.openqa.selenium.remote.server.ServicedSession$Factory (提供者:org.openqa.selenium.firefox.GeckoDriverService) 17:18:15.652信息-功能{AcceptInsureCerts=true, browserName=firefox,}匹配的类 org.openqa.selenium.remote.server.ServicedSession$Factory(提供程序: org.openqa.selenium.chrome.ChromeDriverService)

19:50:39.179信息-Selenium构建信息:版本:“3.6.0”,修订版: '6fbf3ec767'19:50:39.179信息-启动Selenium网格节点 2017-11-01 19:50:39.577:INFO::main:Logging在627ms时初始化为 org.seleniumhq.jetty9.util.log.StdErrLog 19:50:39.633信息-驱动程序 找不到类:com.opera.core.systems.OperaDriver 19:50:39.654信息 -已跳过驱动程序提供程序类org.openqa.selenium.ie.InternetExplorerDriver注册:注册功能 [{ensureCleanSession=true,browserName=internet explorer,版本=, platform=WINDOWS}]与当前平台LINUX不匹配 19:50:39.654信息-驱动程序提供程序类 跳过org.openqa.selenium.edge.EdgeDriver注册: 注册功能功能[{browserName=MicrosoftEdge, 版本=,平台=WINDOWS}]与cu不匹配
java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone-3.6.0.jar -role node -hub http://localhost:4444/grid/register