Hello,
After watching the video of your demo at the Selenium conf, I'm interested by going deeper into the use of webdriverjs with async/await.
However I'm experiencing some issues while trying to use your example.
The problem step by step :
After cloning successfully the project, I did the following console commands:
$ nvm use 7.7.2
Now using node v7.7.2 (npm v4.1.2)
$ npm install --save-dev
...
-----
selenium-standalone installation finished
-----
And all the dependencies ...
Everything seems to be fine for the moment.
However, trying to run npm test
tells me that a plugin is missing :
$ npm test
> [email protected] test /Users/tbo/Code/webdriver-mocha-async-await-example
> _mocha
/Users/tbo/Code/webdriver-mocha-async-await-example/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180
throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname));
^
ReferenceError: Unknown plugin "transform-flow-strip-types" specified in "/Users/tbo/Code/webdriver-mocha-async-await-example/.babelrc" at 0, attempted to resolve relative to "/Users/tbo/Code/webdriver-mocha-async-await-example"
Ok got it, transform-flow-strip-types
is missing, so I'm manually adding it via $ npm install babel-plugin-transform-flow-strip-types
Another $ npm test
return another similar plugin error : ReferenceError: Unknown plugin "transform-object-rest-spread"
I'm then manually adding it via npm.
Running again npm test
throw me a new error :
1) Acceptance Tests "before each" hook:
Uncaught WebDriverError: The driver executable does not exist: /Users/tbo/Code/applications/web/tests/node_modules/selenium-standalone/.selenium/chromedriver/2.27-x64-chromedriver
This is where I'm blocked.
The file is indeed not existing at this path. And I don't understand why npm test is looking at this path.
However it exist at the "correct" path : /Users/tbo/Code/webdriver-mocha-async-await-example/node_modules/selenium-standalone/.selenium/chromedriver/2.27-x64-chromedriver
Question
So my question is why does npm test
try to access to an inexistent path ?
I'm relatively new on Node but I run other webdriverjs projects without any problem.
Any idea ?
The full error log can be viewed there.
Infos
FYI, $ chromedriver
is working well (so chromedriver is in my PATH)
$ chromedriver
Starting ChromeDriver 2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f) on port 9515
Only local connections are allowed.
As well as npm start
$ npm start
> [email protected] start /Users/tbo/Code/webdriver-mocha-async-await-example
> selenium-standalone start
11:01:02.554 INFO - Launching a standalone Selenium Server
11:01:02.597 INFO - Java: Oracle Corporation 25.112-b16
11:01:02.597 INFO - OS: Mac OS X 10.12.3 x86_64
11:01:02.614 INFO - v2.53.1, with Core v2.53.1. Built from revision a36b8b1
11:01:02.682 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC
11:01:02.683 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC
11:01:02.683 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:01:02.683 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
11:01:02.685 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver
11:01:02.685 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered
11:01:02.768 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
11:01:02.768 INFO - Selenium Server is up and running
Selenium started