Skip to content

Not able to use webdriver / protractor for electron app test automation #45

Open
@Jayasankar-m

Description

@Jayasankar-m

An existing angularjs was converted as electron application by following the steps in the site.
The application is working fine and it is possible to navigate through the pages.
But not able to execute automation tests with 'protractor'.

**
1.Had downloaded 'electron-chromedriver' and launched the server.'electron-chromedriver' is listening on port 9515.

2.The conf.js file for protractor is given below
**

exports.config = {
    ...
    seleniumAddress:'http://localhost:9515/',
    capabilities: {
        browserName: 'electron',
        chromeOptions: {
            binary:"<path>\\node_modules\\.bin\\electron",
            args: [" <path>"]
        },
    ...
    }
};

Following error is obtained on executing the tests.

Debugger listening on ws://127.0.0.1:26008/a0465e09-2522-4ccc-ad0e-6423002c1b8e

(node:6456) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[13:50:44] I/launcher - Running 1 instances of WebDriver
[13:50:44] I/hosted - Using the selenium server at http://localhost:9515/
[13:50:44] E/runner - Unable to start a WebDriver session.
(node:6456) UnhandledPromiseRejectionWarning: WebDriverError: unknown error: Failed to create a Chrome process.
  (Driver info: chromedriver=76.0.3783.1 (e74cdb57d7c7a6c37e9b21d8557e53bbdba17e42-refs/branch-heads/3783@{#2}),platform=Windows NT 10.0.15063 x86_64)
    at Object.checkLegacyResponse (<path>\node_modules\selenium-webdriver\lib\error.js:546:15)
    at parseHttpResponse (<path>\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (<path>\node_modules\selenium-webdriver\lib\http.js:441:30)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:6456) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6456) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[13:50:44] E/launcher - Error: WebDriverError: unknown error: Failed to create a Chrome process.
  (Driver info: chromedriver=76.0.3783.1 (e74cdb57d7c7a6c37e9b21d8557e53bbdba17e42-refs/branch-heads/3783@{#2}),platform=Windows NT 10.0.15063 x86_64)
    at Object.checkLegacyResponse (<path>\node_modules\selenium-webdriver\lib\error.js:546:15)
    at parseHttpResponse (<path>\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (<path>\node_modules\selenium-webdriver\lib\http.js:441:30)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
[13:50:44] E/launcher - Process exited with error code 100

Thanks in Advance!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions