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

Showing a window pop-up while running commands in the headless (CLI) mode. #22616

Closed
SinghPramender opened this issue Jun 30, 2022 · 7 comments
Closed
Assignees

Comments

@SinghPramender
Copy link

SinghPramender commented Jun 30, 2022

Current behavior

As we know, cypress does not support other window or tab testing. I am testing a button on which a new window opens. But when i run the code in the command lines using "npx cypress run", a window pop-up and then disappear. But this should not be happened in the headless mode.

Desired behavior

Pop-up window should not show in the screen.

Test code to reproduce

Cypress.Commands.add('changePassword', () => {
    cy.get(commonObjects.profileSection).should('be.visible');
    cy.get(commonObjects.profileSection).click();
    cy.xpath(commonObjects.profileListContainerXpath).within(() => {
        cy.get(commonObjects.profileMenuItems).contains(' Change Password ').should('be.visible');
        cy.get(commonObjects.profileMenuItems).contains(' Change Password ').click();
    });
});

Cypress Version

9.7.0

Other

No response

@cypress-bot cypress-bot bot added the stage: investigating Someone from Cypress is looking into this label Jun 30, 2022
@emilyrohrbough
Copy link
Member

@SinghPramender Can you provide additional information like browser, os as well as a reproducible example using https://github.com/cypress-io/cypress-test-tiny?

@cypress-bot cypress-bot bot added stage: awaiting response Potential fix was proposed; awaiting response and removed stage: investigating Someone from Cypress is looking into this labels Jul 1, 2022
@emilyrohrbough
Copy link
Member

Are you referencing the face Cypress is auto-accepting an alert?

@emilyrohrbough
Copy link
Member

Unfortunately we have to close this issue due to inactivity. Right now there doesn't seem to be enough information to reproduce the problem on our end. We'll have to close this issue until we can reproduce it. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please open a new issue with a reproducible example and link to this issue. Here are some tips for providing a Short, Self Contained, Correct, Example and our own Troubleshooting Cypress guide.

@AzeemChaudary
Copy link

AzeemChaudary commented Sep 25, 2024

I had cypress-cucumber-preprocessor in my cypress project . when I have uninstalled it and executed some tests in headless mode. I am getting a white blank popup which is not interactable we cant click on it. I am getting this even after installing cypress-cucumber-preprocessor again

download

Here is the screenshot

@jennifer-shehane jennifer-shehane removed the stage: awaiting response Potential fix was proposed; awaiting response label Oct 3, 2024
@neminovno
Copy link

Happens while cypress run --spec aaa.cy.ts --browser chrome is running, there is white box visible. I guess it is chrome window related, because box size can be changed with window-size argument:

on('before:browser:launch', (browser, launchOptions) => {
  if (browser.name === 'chrome' && browser.isHeadless) {
    launchOptions.args.push('--window-size=1800,900');
    return launchOptions;
  }
});

Nothing new was installed, just updated Cypress recently.

Cypress: 13.14.2
Browser: Chrome 129 (headless)
Node Version: v20.11.0 (C:\Program Files\nodejs\node.exe)

@gkielwasser
Copy link

gkielwasser commented Oct 15, 2024

@jennifer-shehane Could you please re-open the issue? It seems to still be occurring.

There is a white window which seems a bit different of the browser one we see with --headed.

using default or explicit headless argument
cypress run --browser chrome --headless
cypress run --browser chrome

Os: Windows 10
Cypress: 15.15.0
Browser Chrome 129
Node: v18.20.2

It is related to chrome browser as running cypress run --browser firefox won't show any window.

@neminovno
Copy link

It is Chrome 129 issue:
https://stackoverflow.com/questions/78996364/chrome-129-headless-shows-blank-window

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

6 participants