Skip to content

Add Support for Selenium 4 API

Compare
Choose a tag to compare
@sbabcoc sbabcoc released this 08 Mar 03:57
· 25 commits to master since this release

In this release, I finally finished up the initial support for the Selenium 4 API. This required a bit of refactoring to account for differences in the Selenium API between version 3 and version 4.

  • I implemented automatic driver management for both Selenium 3 (via WebDriverManager) and Selenium 4 (via SeleniumManager).
  • I implemented support for Selenium 4 Grid.
  • I added servlet container classes for both Selenium 4 and Selenium 3.
  • I implemented an ExamplePageLauncher that uses this servlet container to host the unit test example pages.
  • I improved the factoring and implementation of the existing getNodeCapabilities() function.
  • I added settings to enable remote debugging of Hub and Node processes.
  • I added support for posting GraphQL queries.
  • I added a configuration method that reports the Selenium major version for API-specific client code.
  • I revised the extraction of log-based serialized JavaScript exceptions to eliminate the use of deprecated APIs.
  • I fixed some longstanding inaccuracies in my browser plugin capabilities declarations.
  • The last vestiges of Selenium 2 support have been removed.
  • I also installed the Gradle wrapper and upgraded to version 8.3.

NOTE: As of this release, Selenium 4 support for HtmlUnitDriver is limited to self-provided sessions. The ability to provide HtmlUnit sessions from the Grid was not retained in the Selenium 4 Grid implementation. Consequently, unit tests are currently running in Firefox.
ALSO: The installation of JUnit 4 method hooks by JUnit Foundation stopped working at some point. I suspect this may be related to updates in the toolchain I'm using (Gradle/Java). I haven't been able to pin this down yet, but I think the next thing to try is running the tests in a simple Maven harness.