Skip to content
This repository has been archived by the owner on Jan 17, 2020. It is now read-only.

First it can't find selenium-chromedriver, then there is an unexpected identifier. #57

Open
neatville opened this issue Feb 27, 2018 · 4 comments

Comments

@neatville
Copy link

On Windows 10, I installed it with bower install purescript-webdriver. Then it gives me the first error I mentioned, so I did npm install selenium-chromedriver. Now it gives me this error.

  async execute(command) {
        ^^^^^^^
SyntaxError: Unexpected identifier

By any chance, could the installation instructions, or anything else use any updating?

@kritzcreek
Copy link
Contributor

Try these node dependencies as specified in the package.json of this project.

  "dependencies": {
    "chromedriver": "^2.29.0",
    "selenium-webdriver": "3.4.0"
},

@neatville
Copy link
Author

neatville commented Mar 2, 2018

I decided to retry from scratch on Linux.. This time, after doing git clone..., bower install, pulp build, then pulp test, I still get very similar errors.

* Build successful.
* Running tests...
module.js:557
    throw err;
    ^

Error: Cannot find module 'chromedriver'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/path/to/purescript-webdriver/output/Selenium/foreign.js:3:1)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
* ERROR: Subcommand terminated with exit code 1

@garyb
Copy link
Member

garyb commented Mar 2, 2018

Did you npm install too? chromedriver is an npm dependency, not a bower dependency.

@neatville
Copy link
Author

Thanks @garyb, that worked.
These two issues would be separate, but when changing the browser to FireFox, it went to Google with the firefox browser, but I did get this error.

* Building project in /path/to/purescript-webdriver
Compiling Test.Main
* Build successful.
* Running tests...
/path/to/purescript-webdriver/output/Control.Monad.Aff/foreign.js:513
                throw util.fromLeft(step);
                ^

InvalidArgumentError: Could not convert 'text' to string

The chrome browser was tracking my location, which isn't surprising. I found a way to stop that when using selenium with Python, but the documentation for purescript-webdriver doesn't seem to include this. More familiarity with node and the JavaScript ecosystem might be assumed too, something I'm not used to.
Anyways, thanks again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants