Skip to content

Releases: sbabcoc/Selenium-Foundation

Remove 'injected' prefix from 'selenium.grid.plugins properties

19 Dec 15:55

Choose a tag to compare

In this release, I removed the injected prefix that I'd added to the selenium.grid.plugins properties specified in the browser-specific dependency configurations. This should be a first-class setting that cannot be overridden.

Fix generation of node configuration hash codes

16 Dec 00:37

Choose a tag to compare

The primary focus of this release was to resolve issues the hash code computation for node configurations. These values were intended to differentiate between different configurations, avoiding unnecessary configuration file creation. Unbeknownst to me, the standard hashCode() function for MutableCapabilities objects only incorporates the names of specified capabilities, ignoring their associated values. To produce the sorts of unique values I need, I now convert the list of MutableCapabilities objects to a set of maps and generate the hash code from this.

I also included a few other fixes in this release:

  • FoundationSlotMatcher: Remove the HtmlUnit-specific filter for [browserVersion]
  • AbstractSeleniumConfig: Fix an issue with mapping of existing Grid instances that triggered an uncaught ExceptionInInitializerError
  • build.gradle: Add the ability to debug the TestNG and JUnit tests at the start of execution.

Fix ShadowRoot issues; enable command line execution of browser-specific unit tests; resolve HtmlUnit personality issues; propagate System properties to Gradle test tasks; upgrade to latest Selenium/HtmlUnitDriver

12 Dec 15:54

Choose a tag to compare

In this release, I upgraded to the latest releases of Selenium and HtmlUnitDriver (version 4.39.0). I also made several fundamental changes to core functionality to resolve behavioral issues.

NOTE: This release contains breaking changes, which is indicated by increasing the major version number.

I added the garg: prefix to the browserName capabilities specified in HtmlUnit personality objects so these are handled properly in Selenium Grid execution. This takes advantage of a bug fix in HtmlUnit Remote that enables proper matching and configuration of HtmlUnitDriver nodes. I also added a new personality object for the Microsoft Edge browser.

I revised the handling of Gradle project properties to enable execution of the full range of browser-specific unit tests. Note that the browsers property no longer has a default value. This must be specified for any task that triggers unit test execution. For example:

./gradlew clean build -Pbrowsers=htmlunit 

I added the ability to override the standard default values for Selenium Foundation settings by specifying their corresponding System properties prefixed with injected. (e.g. - injected.selenium.browser.name). These injected settings are assigned the same precedence as the default values they override, which are lower in precedence than saved properties, with non-prefixed System properties assigned highest precedence. For example:

./gradlew -Dinjected.selenium.context.platform=android clean build -Pbrowsers=chrome 

This feature is primarily intended for use by the Selenium Foundation project itself, enabling the browser profiles to specify browser-specific default settings that can be overridden by standard System property values and saved properties.

I added a test-task configuration block in build.gradle that propagates several sets of System properties...

  • ... whose names end with .binary.path
  • ... whose names begin with injected., selenium., appium., testng., or junit.

I resolved some fundamental issues related to the handling of ShadowRoot search contexts.

  • ShadowRoot: Add a [shadowRoot] field, using this as the wrapped context:
    • Initialize [shadowRoot] in all constructors.
    • Override findElements() and findElement(), invoking the corresponding methods of [shadowRoot].
    • Revise getWrappedContext() to return [shadowRoot] instead of instantiating a new one each time.
  • FirefoxShadowRoot: Do not override getWrapperContext(), relying on the superclass implementation.
  • SearchContextUtils: Change argument types of all affected methods from WrapsContext to SearchContext:
    • buildScriptToLocateElements(no index), buildScriptToLocateElements(with index), getContextType()
    • getContextType(): Remove explicit one-level context unwrapping from isElementContext() call.
    • isElementContext(): Auto-unwrap the specified context; add exception handling for JSON serialization.
  • RobustElementWrapper: Add context unwrapping to SearchContextUtils.buildScriptToLocateElement() call.

I also included a few other minor updates:

  • Parameterize the DetectsLoadCompletion interface so that only ComponentContainer objects are allowed to implement it.
  • Enable load completion checks to be performed when items in component collections are instantiated.
  • Implement the DetectsLoadCompletion interface in ExamplePage and all example component classes.
  • selenium3Deps.gradle: Upgrade to the latest release of WebDriverManager (version 6.3.3).
  • WebDriverUtilsTest: Remove browser name override for EdgeDriver from testBrowserName().
  • SeleniumConfig (selenium 4): Remove global dependency context for ChromiumDriver.
  • EdgePlugin (selenium 4): Add dependency context for ChromiumDriver.

Fix Mac-specific 'PM2' process launch issue

17 Nov 08:26

Choose a tag to compare

In this release, I fixed a Mac-specific issue launching the Appium process with the 'PM2' process manager.

  • I was quoting the path to the Appium main script and the process output path, which is only applicable to the Windows platform.
  • I needed to add the PATH environment variable to the ProcessBuilder object for launching Appium on Mac.

I also noticed that I'd failed to allow insecure ChromeDriver download and ADB shell access in the Selenium 3 profile.

Complete implementation of support for Mac2 engine

15 Nov 04:50

Choose a tag to compare

In this release, I finally got the support for the Appium Mac2 engine fully implemented. In creating a working "Hello World" example of automated interactions with TextEdit, I discovered a few Mac-specific issues that no one else has reported:

  • On MacOS, normal process termination returns exit code 143 instead of the exit code 1 returned on Windows.
  • The Mac2 engine doesn't support alerts, which was triggering UnsupportedCommandException in the alert check performed by ContainerMethodInterceptor.
  • The command line used to get the process ID of servers managed by Selenium Foundation was slightly malformed.

I also updated the documentation collection copies of several example classes to align them with their actual Java counterparts.

Finish iOS support; upgrade to 4.38.0

31 Oct 20:54

Choose a tag to compare

In this release, I completed implementation of support for the XCUITest engine of Appium. This largely involved adding a build of the iOS sample application from the Appium project, revising the unit test and page models accordingly.

I also upgraded to the latest Selenium release (version 4.38.0)

Add direct activity navigation for UiAutomator2; fix subtle bugs

23 Oct 03:18

Choose a tag to compare

The primary objective of this release was to add the ability to open Android activities directly with UiAutomator2. This feature is quite straightforward with Espresso but required the use of Appium's mobile: shell script for UiAutomator2. To facilitate a broader range of options, I added action and category properties to the PageUrl annotation.

In the process of implementing this new feature, I discovered a few subtle bugs that heretofore had gone undetected.

  • I had used the Xpath selector /* to select the first element of a page for refresh detection. This worked for web applications, but caused failures on Android applications if RemoteWebDriver was used instead of AndroidDriver. I switch to using //* instead, which works even with RemoteWebDriver.
  • A dependency declaration issue had caused the code to fall back to RemoteWebDriver because the java-client artifact was only being included in test scope.

Upgrade to Appium Java client 10.0.0

12 Oct 23:22

Choose a tag to compare

In this release, I upgraded the Appium Java client to the latest release (version 10.0.0).

Upgrade to Selenium 4.36.0

12 Oct 05:19

Choose a tag to compare

In this release, I upgraded to the latest Selenium version (4.36.0).

Upgrade to Selenium 4.35.0

23 Aug 04:29

Choose a tag to compare

In this release, I upgraded to the latest Selenium version (4.35.0). I also upgraded the rest of the direct dependencies.