Closed aarif313 closed 8 months ago
the web elements are hiding behind popup hence not able to perform any action on it and test cases are failing
Hi @aarif313 ! I have not seen such popup before, maybe you could share me the source code of it? I believe you should be able to work with this popup as with UI elements, e.g. find the close button using some locator and click on it.
After some googling I've found the suggestion https://answers.microsoft.com/en-us/microsoftedge/forum/all/how-to-stop-annoying-pop-up-asking-to-download/b2e13675-3249-4107-99ee-7838f17ceabf to disable policy with preference key name ShowRecommendationsEnabled. I have found that it could be disabled in registry, unfortunately haven't found related capability
@aarif313 you might also try adding startArgument "-inprivate", then you should not be seeing excessive popups (as in private mode)
you can also find a lot of supported start arguments for edge to experiment with here: https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/browser_launcher.py#L2554
@mialeska Thanks for your response, Let me try this. Will update you soon.
Hi @mialeska
Adding a startArgument "-inprivate" creating another issue, getting below error
OpenQA.Selenium.WebDriverException : unknown error: unhandled inspector error: {"code":-32000,"message":"Failed to open new tab - no browser is open"} (Session info: MicrosoftEdge=120.0.2210.77)
This is already reported at below thread, https://github.com/SeleniumHQ/selenium/issues/11729
Hi @aarif313 !
Are you getting this error on attempt to open a new tab?
If yes, then javascript method should work for you:
AqualityServices.Browser.Tabs().OpenNewTabViaJs();
Hi @mialeska
I added startArgument as "-inprivate" for Edge browser and to open new tab used AqualityServices.Browser.Tabs().OpenNewTabViaJs(); and this solved pop up issue in Edge browser and pop up is no more appearing.
Thanks a ton.
Marking it as Closed.
While executing test cases on Edge browser I am getting below pop-up
I have made below setting for Edge browser in my settings.json file
"edge": { "webDriverVersion": "MatchingBrowser", "capabilities": { "enableVNC": true, "unhandledPromptBehavior": "default" }, "options": { "intl.accept_languages": "en", "safebrowsing.enabled": "true", "profile.default_content_settings.popups": "0", "disable-popup-blocking": "true", "download.prompt_for_download": "false", "download.default_directory": "./downloads" }, "excludedArguments": [], "startArguments": [ "--ignore-ssl-errors=yes", "--ignore-certificate-errors" ] }
But still this pop-up continues to appear.
Please help