Description
I am trying to run .Analyze() on the Safari browser but I am getting a NoSuchWindowException. There seems to be a blank browser tab opened (which I have read from the similar issue: dequelabs/axe-core-maven-html#391 is intentional) but when trying to switch back to the browser tab with the intended website page in, it no longer exists.
I have also ran the same test against the Chrome and Firefox browser on Mac (and Edge, Chrome, Firefox on Windows), and there are no issues.
I have tried running the test with the use of the obsolete method .UseLegacyMode() and the test does work. But obviously this is an obsolete method so I would prefer to not use this.
Message:
Test method Tests_ACWEB.Tests.Accessibility.AccessibilityTests.AccessibilityAnonymousProductCategory threw exception:
OpenQA.Selenium.NoSuchWindowException:
Stack Trace:
WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
TargetLocator.Window(String windowHandleOrName)
TargetLocator.Window(String windowHandleOrName)
AxeBuilder.IsolatedFinishRun(Object[] partialResults, Object options)
AxeBuilder.AnalyzeAxeRunPartial(Object rawContextArg)
AxeBuilder.AnalyzeRawContext(Object rawContextArg)
AxeBuilder.Analyze()
Expected behavior
Accessibility analysis to be ran against our website page that is navigated to before the blank page is opened
Actual behavior
A blank page is opened and the website page first changes to also be a blank page and then is closed, resulting in a) no analysis and b) a NoSuchWindowException being thrown
Screenshots
-
Website page navigated to where accessibility analysis is required:
-
The blank page tab is fully loaded but at the same time the original tab is now also a blank page!:
-
Finally only a blank page browser tab / window is left open:
Related Tickets
This ticket is related but is for Java (dequelabs/axe-core-maven-html#391)
Desktop (please complete the following information):
- Product: Selenium with C# in the test repo and Deque.AzeCore.Selenium v4.9.1
- Product Version: 4.9.1
- Latest Product Version it is NOT happening in: if the .UseLegacyCode() is used
- OS: MacOS
- Browser : safari