Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Protractor tests without internet access fails #5490

Open
c16a opened this issue Jan 19, 2021 · 7 comments
Open

Running Protractor tests without internet access fails #5490

c16a opened this issue Jan 19, 2021 · 7 comments

Comments

@c16a
Copy link

c16a commented Jan 19, 2021

Bug report

  • Node Version: 14.6.0
  • Protractor Version: 7.0.0
  • Angular Version: 11.0.9
  • Browser(s): chrome
  • Operating System and Version: Windows 10 Enterprise
  • Your protractor configuration file: The default config file generated via ng new
  • Steps to reproduce the bug

Run the following steps

ng new my-app
npm install
# Download chrome driver binaries and store in project folder
# Configure the location in the `chromeDriver` config variable in protractor config.
# Disconnect internet
npm run e2e
# Fails since it still tries to connect to internet and download chromedriver
@c16a
Copy link
Author

c16a commented Jan 31, 2021

@darrinholst @marcenuc @heathkit @szimek Any pointers on the above are appreciated

@Fuun347
Copy link

Fuun347 commented Feb 1, 2021

@c16a have you tried adding seleniumAddress: 'http://localhost:4444/wd/hub', to your configuration file and launching a selenium server on port 4444 using webdriver-manager? This might solve your issue here.

@c16a
Copy link
Author

c16a commented Feb 1, 2021

Hey @Fuun347 when I'm during direct connect, I believe I shouldn't need to run a standalone selenium server.

Is my understanding correct?

@devoto13
Copy link
Contributor

devoto13 commented Feb 1, 2021

@c16a I'm not sure that downloading into the project folder is a correct approach, you should probably run ./node_modules/.bin/webdriver-manager update to fetch the necessary WebDriver binaries. Once done you can pass the --webdriver-update false flag to ng e2e command to disable fetching WebDriver binaries.

@c16a
Copy link
Author

c16a commented Feb 1, 2021

@devoto13 I'm in an enterprise environment where we have the gecko, and chrome driver binaries stored in private Nexus. But looks like WebDriver manager expects a full CDN mirror.

@devoto13
Copy link
Contributor

devoto13 commented Feb 1, 2021

Well, in this case, you probably can customize the path to the driver binary: https://stackoverflow.com/a/48414182/1377864
I haven't tested this myself, but it will likely work.

@andredesousa
Copy link

The problem is related to Angular CLI.
@c16a changes e2e script to: "e2e": "ng e2e --webdriverUpdate=false"

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

No branches or pull requests

4 participants