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

Bug: NoSuchWindowException being thrown when trying to run AxeBuilder.cs .Analyze() method on Safari browser on Mac OS #177

Open
RhiannonJonesAC opened this issue Jun 20, 2024 · 0 comments
Labels
bug Something isn't working web-apis

Comments

@RhiannonJonesAC
Copy link

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

  1. Website page navigated to where accessibility analysis is required:
    website

  2. A blank page browser tab starts to open:
    blank tab opened

  3. The blank page tab is fully loaded but at the same time the original tab is now also a blank page!:
    both tabs are blank

  4. Finally only a blank page browser tab / window is left open:
    only blank tab

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
@RhiannonJonesAC RhiannonJonesAC added the bug Something isn't working label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web-apis
Projects
None yet
Development

No branches or pull requests

2 participants