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

Launch Cypress with Chrome "Incognito" using --incognito flag #4037

Closed
beauholland opened this issue Apr 26, 2019 · 7 comments
Closed

Launch Cypress with Chrome "Incognito" using --incognito flag #4037

beauholland opened this issue Apr 26, 2019 · 7 comments
Labels
type: feature New feature that does not currently exist

Comments

@beauholland
Copy link

Current behavior:

Launch Cypress with Chrome "Incognito" results in: "Whoops can't run your tests"

Incognito

Desired behavior:

Able to launch Cypress with Chrome "Incognito"

Steps to reproduce: (app code and test code)

Clone repo to test: (https://github.com/beauholland/cypress-incognito)

Versions

Cypress 3.2.0
Node 10.14.1
Chrome 73.0.3683.103
Windows 10 V1803 build 17134.706

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Apr 26, 2019

Can verify, this is what happens when --incognito flag is passed. This is because all extensions are disabled when launched in incognito. Cypress itself uses an extension to run within the browser - and this unfortunately is the slightly unhelpful message that displays when the extension is not present.

Can I ask what functionality of --incognito it is that you are wanting to verify during testing?

Cypress launches within its own profile and also that isolates a few things for testing purposes, so it would probably be more feasible to mimic the behavior you are wanting from incognito within Cypress than to actually launch incognito mode outright.

@jennifer-shehane jennifer-shehane added stage: needs information Not enough info to reproduce the issue type: feature New feature that does not currently exist labels Apr 26, 2019
@beauholland
Copy link
Author

Thanks @jennifer-shehane - got it, will try alternative approaches to find the real problem.

Trying Incognito mode in chrome to fix an intermittent issue with Auth0 "Request header or cookie too large" problem after tests run too frequently. Hitting it with a sledgehammer I know - will spend the time and find the fix.

Thanks again.

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Apr 26, 2019
@ChaseBig
Copy link

ChaseBig commented May 3, 2019

@jennifer-shehane I am having the same issue. Our webapp uses a library called localForage and it stores the state in the browser even after chrome is closed and a new cypress test instance is opened. I have the following set to run before each test:

beforeEach(() => {
    cy.clearLocalStorage()
    cy.clearCookies()

... but this is not clearing the localForage indexedDb cache. In order to run our test on the same test-user scenario account, I need to run in incognito mode OR somehow disable indexedDb in a configuration somewhere. Ideally we'd be able to run in incognito mode, but I understand this isn't exactly possible given the fact that Cypress uses a chrome plugin to run.

@jennifer-shehane
Copy link
Member

@ChaseBig There is an open issue for clearing indexedDb here with some workarounds: #1208

@T-e-j-k-u-m-a-r
Copy link

Any comment on the how to execute the scripts in chrome incognito mode? Is there some settings that can be added into cypress.json file to handle it?

@anchalkumra
Copy link

Hi , Any update on this ? I am facing the same issue when trying to run the chrome incognito mode.

@AnshitaBhasin
Copy link

Try this https://youtu.be/28-axK6SxgU..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

6 participants