Linking selenium with electron framework (c#)

前端 未结 1 1777
臣服心动
臣服心动 2020-12-19 19:06

I\'ve already written few lines of code in C# using Selenium webdriver. As my application was transferred to the Electron framework everything has changed and honestly, I do

相关标签:
1条回答
  • 2020-12-19 19:44

    Spectron with mocha is supposed to be faster.

    But still here is what you need.This is Java & Selenium.

    System.setProperty("webdriver.chrome.driver","C:\\electron-chromedriver\\bin\\chromedriver.exe");
    ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.setBinary("C:\\Users\\app.exe");
    chromeOptions.addArguments("start-maximized");
    DesiredCapabilities capability = new DesiredCapabilities();
    capability.setCapability(CapabilityType.BROWSER_NAME, "Chrome");
    capability.setCapability("chromeOptions", chromeOptions);       
    driver = new ChromeDriver(chromeOptions);  
    

    I have used the packaged electron app for binary (i.e) app.exe .

    I think this is what you need.

    0 讨论(0)
提交回复
热议问题