小编pro*_*eus的帖子

webdrivermanager 是否支持 RemoteWebDriver (Selenium Grid)?

我已经在我的 pom.xml 文件中更新了 WebDrivermanager 的依赖项。在像下面这样在我的本地运行代码时,它似乎工作正常。

driver = new ChromeDriver(capability);
Run Code Online (Sandbox Code Playgroud)

但是当我尝试使用 RemoteWebDriver 远程运行代码时,它失败并不断要求为浏览器添加二进制文件

URL remote_grid = new URL("http://" + seleniumHub + ":" + seleniumHubPort + "/wd/hub");
driver = new RemoteWebDriver(remote_grid, capability);
Run Code Online (Sandbox Code Playgroud)

它抛出以下异常。

[Invoker 1386767190] Keeping method SeleniumInit.setUp(java.lang.reflect.Method, org.testng.ITestContext)[pri:0, instance:com.wo2.commonfucntion.index.LoginIndex@598067a5] for class [TestClass name=class com.wo2.commonfucntion.index.LoginIndex]
[Invoker 1386767190] Keeping method SeleniumInit.tearDown(org.testng.ITestResult)[pri:0, instance:com.wo2.commonfucntion.index.LoginIndex@598067a5] for class [TestClass name=class com.wo2.commonfucntion.index.LoginIndex]
[Invoker 1386767190] Keeping method SeleniumInit.setUp(java.lang.reflect.Method, org.testng.ITestContext)[pri:0, instance:com.wo2.commonfucntion.index.LoginIndex@598067a5] for class [TestClass name=class com.wo2.commonfucntion.index.LoginIndex]
[Invoker 1386767190] Invoking @BeforeMethod SeleniumInit.setUp(java.lang.reflect.Method, org.testng.ITestContext)[pri:0, instance:com.wo2.commonfucntion.index.LoginIndex@598067a5]
13:27:40.503 [main] INFO  i.g.bonigarcia.wdm.BrowserManager - Reading https://chromedriver.storage.googleapis.com/ …
Run Code Online (Sandbox Code Playgroud)

webdrivermanager-java

0
推荐指数
1
解决办法
3151
查看次数

标签 统计

webdrivermanager-java ×1