dequelabs / axe-webdriverjs

Provides a chainable axe API for Selenium's WebDriverJS and automatically injects into all frames.
Mozilla Public License 2.0
130 stars 46 forks source link

IE does not support switchToFrame #71

Closed JoshuaKGoldberg closed 6 years ago

JoshuaKGoldberg commented 6 years ago

🙃

Running this with jest-environment-webdriver and error reporting in https://github.com/SeleniumHQ/selenium/pull/6321:

 FAIL  test/end-to-end/dev/Tests/Consumption/ConsumptionAccessibility.test.ts (35.275s)
  Consumption Accessibility
    × passes aXe (7426ms)

  ● Sample Accessibility Tes › passes aXe

    UnsupportedOperationError: switchToFrame: Error 404: Not Found
    Not Found

      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:557:11)
      at Executor.execute (node_modules/selenium-webdriver/lib/http.js:468:26)

Looks like it's from the driver.switchTo()s in findFramesAndInject in lib/inject.js. Is there a way around using them? Can the script be injected using, say, driver.executeScript and some fancy string concats?

stephenmathieson commented 6 years ago

Is there any way you could provide a more complete set of reproduction steps? The switchToFrame method is part of Selenium core, so I'm struggling to understand why it'd 404.

JoshuaKGoldberg commented 6 years ago

part of Selenium core

I assume it's because the IE driver doesn't support that method.

You should be able to repro using the sample code listed in the README.md Usage section when running against Internet Explorer using IEDriverServer.exe.

If it helps, I'm running on Windows Server 2016 against IE 11.

stephenmathieson commented 6 years ago

Thanks, this helps. I'll see about getting a Windows machine for testing and/or use a VM.

stephenmathieson commented 6 years ago

I've done some primitive testing and research, and am not able to reproduce this. What version of IE driver are you using?

JoshuaKGoldberg commented 6 years ago

I'm on https://selenium-release.storage.googleapis.com/3.9: IEDriverServer_Win32_3.9.0.zip.

stephenmathieson commented 6 years ago

I still haven't been able to reproduce this. Is there any way you can setup a minimal reproduction repo/gist?

JoshuaKGoldberg commented 6 years ago

I haven't been able to 😕 so I guess it's probably something convoluted on my end... ah well. Thanks for testing!

stephenmathieson commented 6 years ago

Sure thing! Sorry I couldn't have been more help. Feel free to reopen of this comes up again.