org.openqa.selenium.WebDriverException:未知错误:DevToolsActivePort文件不存在 - java

我尝试在作为节点连接到硒网格的远程PC上启动电子应用程序。以前它可以正常工作。但是现在我收到此错误“ DevToolActivePort文件不存在”

    System.out.println("launch application in windows PC");     
    capa  = new DesiredCapabilities();

    capa.setBrowserName("chrome");
    File file = new File("path\\to\\file\\.exe"); 
    URL server = new URL("http://ip_of_remote_pc:4444/wd/hub"); 

    ChromeOptions options = new ChromeOptions();
    options.setBinary(file);   //Sets the path to the Chrome executable
    capa.setCapability(ChromeOptions.CAPABILITY, options);
    driver2 = new RemoteWebDriver(server, capa); //launch the application
    System.out.println("launching application in remote PC");
    driver2.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);   
    System.out.println("Application launched"); 

参考方案

下载用于电子的Chrome驱动程序,或访问此
https://github.com/electron/electron/releases
在这里安装chromedriver,它将起作用

NoSuchMethodError:org.openqa.selenium.support.ui.WebDriverWait.until - java

我正在尝试运行以下硒代码: WebDriver driver; System.setProperty("webdriver.chrome.driver", "C:\\Driver\\chromedriver.exe"); driver = new ChromeDriver(); driver.get("htt…

Selenium Webdriver(Java)-查找禁用了属性=“”的元素 - java

我有<input id="test" disabled="">。如何找到具有属性disable =“”的元素。附言:在这种情况下,我不需要使用ID。我想找到一个具有禁用属性的元素。我尝试使用String enbl = Login.driver.findElement(By.cssSelector("…

等效于C#中的ASM类(Java) - java

我的任务是将项目转换,同时将其升级,从Java转换为C#。但是,我发现以下类及其功能存在问题:import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode; import jdk.internal.org.objectweb.asm.tree.ClassNode; import jdk.interna…

将ExtentTest的默认设置为FAILED - java

我正在使用extentreports为使用Java和Selenium编写的测试添加报告。我注意到,如果ExtentTest有两个日志“ INFO”和“ PASSED”,则如果未捕获通过日志,则将其视为“通过”。我如何以某种方式更改它,如果未通过测试,它将被自动标记为“失败”? 参考方案 默认情况下,无法更改行为以使测试用例失败。它是一个设计决策,每个测试框架…

Selenium:是否有用于.net的构建自动化工具(如“ Maven”),我们可以在其中定义依赖项,插件,测试套件等 - java

以前,我使用Java自动执行Web应用程序-selenium,testng / junit,Maven,Jenkins。现在,由于公司要求,我需要从Java迁移到.Net环境。  是否有Maven for .net等任何构建自动化工具? 参考方案 有很多推荐的工具是1)NUBuild的http://nubuild.codeplex.com/2)建立https…