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

Unable to switch pages in karate-chrome docker due to pop-up blockers #1955

Closed
talk2sreenu opened this issue Mar 24, 2022 · 1 comment
Closed

Comments

@talk2sreenu
Copy link

While executing UI tests in karate-chrome docker container, I see that chrome instance opening with default pop-up blocker feature hence scripts containing the switchPage step are failing eventually. I validated this behavior in my local which is working fine. When I looked at the DockerTarget class, there is no option to suppress the pop-up blockers similar to the chrome driver implementation.

I tried adding "--disable-popup-blocking" to the driverTarget configuration, but the issue is still happening. Below is the complete driver configuration used for docker container.
* configure driverTarget = { docker: 'ptrthomas/karate-chrome', showDriverLog: true, addOptions:["--disable-popup-blocking", "--disable-extensions"]}

Any help to fix this issue or a possible workaround is greatly appreciated.

The sample project with this issue can be accessed here https://github.com/talk2sreenu/karateChromeSwitchPage.git
Maven goal to execute the scripts : mvn clean test

Thanks in advance.

@ptrthomas
Copy link
Member

I'm closing this as a duplicate of #1935

yes ideally there should be a way to customize the docker chrome start script to add custom options. anyone is welcome to contribute a PR or an approach

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

No branches or pull requests

2 participants