Can I make protractor use the IEDriverServer.exe webdriver-update installed in node_modules?

SnoopDougg

I'm writing acceptance tests for my angular web application project. They're run via protractor, and work just fine on chrome. But when I try to run them on Internet Explorer 11, I get a failure complaining that "The path to the driver executable must be set by the webdriver.ie.driver system propery". However, I have my project configured to download the IE driver to the same place as the chromedriver executable.

While I'm sure I could move the IE driver excutable to a folder stored in my PATH env variable, then every developer on the project would have to do the same or update their PATHs to point to the driver.

My question is - is there a simple configuration I'm missing to make this IE driver available to protractor just as Chrome's driver is?

My package.json:

{
//...
"scripts": {
    "webdriver-update": "webdriver-manager update --ie",
    "preacceptance-tests": "npm run webdriver:update -- --standalone",
    "acceptance-tests": "protractor",
    //...
}

My protractor.conf.js:

exports.config = {
    baseUrl: 'http://localhost:3000/',
    specs: [
        'src/**/**test.ts',
        'src/**/*test.ts'
    ],
    capabilities: {
        'browserName': 'internet explorer' //If I put chrome here, the tests pass
    },
    onPrepare: function() {
        browser.ignoreSynchronization = true;
    },
    seleniumServerJar: "node_modules/protractor/selenium/selenium-server-standalone-2.51.0.jar",
    useAllAngular2AppRoots: true
};

I run "npm run acceptance-tests", and chromedriver.exe and IEDriverServer.exe are downloaded to my node_modules/protractor/selenium folder. Protractor seems to be aware of the chromedriver, but why can't it see the IEDriverServer?

I can't seem to find an answer anywhere, other than manually pointing my PATH to this folder. It seems like I shouldn't have to if protractor can find the chromedriver...

Andrew Regan

As far as I know from having checked the Selenium source, there's only one workaround.

If an executable named IEDriverServer.exe exists in the current working directory (which is explicitly checked, and which you can query with process.cwd()), then that instance will be chosen and the PATH check bypassed (the error message is a little misleading).

You can follow the logic in the Selenium source here and here.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I make require() use node_modules in Parse Cloud Code?

From Dev

How can I update the protractor npm module in node.js?

From Dev

How to set the IEDriverServer.exe through command line in protractor

From Dev

How to set the IEDriverServer.exe through command line in protractor

From Dev

Why can't TypeScript find modules that are installed into 'node_modules'?

From Dev

Selenium WebDriver Focus Jumps to IEDriverServer.exe CMD Window

From Dev

How can I make 'require(packageName)' read multiple module paths besides 'node_modules'?

From Java

How to use executables from a package installed locally in node_modules?

From Dev

Why Will Protractor Webdriver Update Not Execute?

From Dev

Setting IEDriverServer location with protractor

From Dev

Protractor: how I can rightly use filtering in Protractor?

From Dev

Can I use Selenium (webdriver) for Chrome without using chromedriver.exe?

From Dev

If I'm using NBMS to update my application, can I make it deactivate a module that was previously installed?

From Dev

How can I use BrowserMob Proxy with Protractor?

From Dev

can i use '>' css selector in protractor?

From Dev

protractor: can I use expect in the middle of a test?

From Dev

I installed WINE on my device, can I make a WINE.desktop file to open *.exe s via GUI?

From Dev

How can I update an installed stack package?

From Dev

Why can I run globally installed node modules by name?

From Dev

How can I make a POST request from a Protractor test?

From Dev

How can I force ag to find matches in node_modules?

From Dev

How can i make my exe to be bounded to some other exe?

From Dev

Can I use Ubuntu Live as if it was installed?

From Dev

Unable to use Protractor webdriver-manager

From Dev

Unable to use Protractor webdriver-manager

From Dev

How can I use a parameter to a protractor configuration file to chose steps?

From Dev

How can I use Protractor with google.com?

From Dev

How can I use global functions in Angularjs Protractor?

From Dev

How can I use command line arguments in Angularjs Protractor?

Related Related

  1. 1

    How can I make require() use node_modules in Parse Cloud Code?

  2. 2

    How can I update the protractor npm module in node.js?

  3. 3

    How to set the IEDriverServer.exe through command line in protractor

  4. 4

    How to set the IEDriverServer.exe through command line in protractor

  5. 5

    Why can't TypeScript find modules that are installed into 'node_modules'?

  6. 6

    Selenium WebDriver Focus Jumps to IEDriverServer.exe CMD Window

  7. 7

    How can I make 'require(packageName)' read multiple module paths besides 'node_modules'?

  8. 8

    How to use executables from a package installed locally in node_modules?

  9. 9

    Why Will Protractor Webdriver Update Not Execute?

  10. 10

    Setting IEDriverServer location with protractor

  11. 11

    Protractor: how I can rightly use filtering in Protractor?

  12. 12

    Can I use Selenium (webdriver) for Chrome without using chromedriver.exe?

  13. 13

    If I'm using NBMS to update my application, can I make it deactivate a module that was previously installed?

  14. 14

    How can I use BrowserMob Proxy with Protractor?

  15. 15

    can i use '>' css selector in protractor?

  16. 16

    protractor: can I use expect in the middle of a test?

  17. 17

    I installed WINE on my device, can I make a WINE.desktop file to open *.exe s via GUI?

  18. 18

    How can I update an installed stack package?

  19. 19

    Why can I run globally installed node modules by name?

  20. 20

    How can I make a POST request from a Protractor test?

  21. 21

    How can I force ag to find matches in node_modules?

  22. 22

    How can i make my exe to be bounded to some other exe?

  23. 23

    Can I use Ubuntu Live as if it was installed?

  24. 24

    Unable to use Protractor webdriver-manager

  25. 25

    Unable to use Protractor webdriver-manager

  26. 26

    How can I use a parameter to a protractor configuration file to chose steps?

  27. 27

    How can I use Protractor with google.com?

  28. 28

    How can I use global functions in Angularjs Protractor?

  29. 29

    How can I use command line arguments in Angularjs Protractor?

HotTag

Archive