Testing Electron app using selenium grid, java in windows environment

426 views
Skip to first unread message

kinoeater

unread,
Oct 20, 2018, 4:51:49 PM10/20/18
to Selenium Users
Hi, 
Did you try to use the same method on the remote driver with the help of selenium grid? My application is an electron-based messaging application and needs to send-receive message between two application. I can do anything on my local machine by webdriver, such as; sending IMs, using all the buttons, login-logout etc. but when it comes to using the remote driver which is set for the node machine, even though app's binary is invoked and the app is launched, the remote driver cannot do anything,

I am always getting the same error;

Caused by: org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist
  (Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.27 seconds


public class remotetest {
WebDriver Rdriver;
@Test
public void launch() throws InterruptedException, IOException {

    System.setProperty("webdriver.chrome.driver","D:\\work\\grid\\chromedriver.exe"); // chromedriver path

    ChromeOptions options = new ChromeOptions();
options.setBinary("D:\\Users\\myol\\AppData\\Local\\Programs\\ConnectMe_S4B2015\\Connect Me S4B2015.exe");
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    capabilities.setBrowserName("chrome");
    capabilities.setPlatform(Platform.WINDOWS);

    WebDriver Rdriver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capabilities);

        for (String hand : Rdriver.getWindowHandles()) {

        Rdriver.switchTo().window(hand);
        }

Automation-Misfits

unread,
Jan 13, 2019, 8:07:26 AM1/13/19
to Selenium Users
Hi,

I used to get this issue also. After analysis this I came to understand that this issue is because of the version compatibility of electron with chromedriver. 
Please use this link and download the right chrome version. https://github.com/electron/electron/releases

Thanks.
Reply all
Reply to author
Forward
0 new messages