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

Change chromedriver network conditions #918

Open
gbkwiatt opened this issue Feb 22, 2021 · 1 comment
Open

Change chromedriver network conditions #918

gbkwiatt opened this issue Feb 22, 2021 · 1 comment

Comments

@gbkwiatt
Copy link

I know that chromedriver supports changing network conditions ( offline e.g.)
https://bugs.chromium.org/p/chromedriver/issues/detail?id=984

Is there anyway, to do it from nightwach-api ? I mean is there a way to communicate with chrome driver dynamically during the test ?

@LucaLis
Copy link

LucaLis commented Mar 5, 2021

Hi. I'm successfuly using some Chrome specific features in my Nightwatch tests using Puppeteer (https://github.com/puppeteer/puppeteer). All you need to do is to allow Nightwatch to create the browser instance for you, then connect Puppeteer to this instance (https://github.com/puppeteer/puppeteer/blob/v8.0.0/docs/api.md#puppeteerconnectoptions) and use Puppeteer API as you wish (https://github.com/puppeteer/puppeteer/blob/v8.0.0/docs/api.md#puppeteernetworkconditions)

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

2 participants