Skip to content

Releases: sbabcoc/Selenium-Foundation

Upgrade to the latest dependencies

10 Jul 20:19
Compare
Choose a tag to compare

In this release, I updated to the latest releases of Settings, JUnit Foundation, and TestNG Foundation.

Apply the secret sauce to get Espresso working

10 Jul 03:54
Compare
Choose a tag to compare

In this release, I applied the workaround documented here to enable automation of Android applications with the Appium Espresso engine. I needed to tweak a few things to make everything happy, and I also discovered a bug in the approach I'd used to ensure that the "personality" value was always included in desired capabilities objects.

Add the ability to manage local stand-alone Appium server instances

08 Jul 02:51
Compare
Choose a tag to compare

In this release, I refined the management of Appium node servers to enable management of local stand-alone instances. I revised the storage of custom Selenium Foundation options to conform with W3C specifications. I also fixed a defect in the strategy used to extract driver capabilities records from node capabilities.

  • GridUtility:
    • Revise the getNodeCapabilities method to return the single object supplied by the node instead of a one-item array.
    • Add new getNodeDriverCaps method to extract the driver capabilities records contained in the node capabilities object.
    • Revise the getPersonality method to accept a Capabilities object and to check "nord:options" for the "personality" value.
    • Add new getNordOptions method to extract the "nord:options" capability from Capabilities objects.
  • SeleniumGrid:
    • Revise the addNodePersonalities method to take advantage of new and revised GridUtility methods.
    • Revise the shutdown method to try the AppiumGridServer.shutdownAppiumWithPM2 method for local node servers.
  • TargetType:
    • Revise the matches method to get "personality" and "pluginClass" from the "nord:options" capability.
  • AbstractAppiumPlugin:
    • Revise the create method to add the "appiumWithPM2" option to the node capabilities if PM2 was used to launch Appium.
    • Extract the core implementation of the shutdown method into a new static shutdownAppiumWithPM2 method.
    • Add new static shutdownAppiumWithPM2 method to enable GridServer objects created for active local node servers to shut down stand-alone Appium nodes.
    • Add new static isAppiumWithPM2 method to determine if the specified URL serves an Appium node running with PM2.
  • Driver Plugins: Move custom Selenium Foundation options into a new "nord:options" capability.

For stand-alone operation, use 'pm2' as the execution context for 'appium'

06 Jul 04:06
Compare
Choose a tag to compare

Selenium Grid node servers implemented in Java that extend RemoteWebDriver are launched via GridLauncherV3, automatically spawning as stand-alone processes. By contrast, Appium runs as a child process of the execution context that launches it. This doesn't present any particular challenge when running a collection of tests that use Selenium Foundation to manage a Grid instance that exists only while the tests are running.

For execution as a stand-alone process, I added the ability to use the PM2 process manager as the execution context for the Appium node server. This feature must be explicitly activated with the APPIUM_WITH_PM2 configuration settings.

Major update to enable Android automation, including "target platform" support

03 Jul 21:53
Compare
Choose a tag to compare

In this release, I finally deployed functioning support for Android application tests. To get this all working smoothly, I needed to make fundamental revisions to the behavior of the Local Grid feature. These changes break backward compatibility, which is why this release got a major-version bump.

  • I revised the instantiation behavior of Local Grid instances to separate the creation of the hub/node model from the launch of the associated Grid servers. These revisions included renaming existing methods (start/launchcreate), adding a new activate method to activate the local Grid instance, and adding a new start method that's solely focused on starting the local Grid server processes, ensuring that the servers are active and registered.
  • The "personality" records returned by driver plug-ins now specify the class of the plug-in with which they're associated.
  • I tweaked the behavior of the AbstractSeleniumConfig.getModifications method to ensure that Capabilities for Grid nodes and driver requests will always specify "personality".
  • Prior to instantiating a driver, I ensure that the local Grid is activated. I also remove the "personality" and "pluginClass" capabilities from the request, which are proprietary and will be rejected by strict W3C-compliant providers.
  • These revisions enabled me to modify the implementation of the target platform feature to avoid launching a Grid or instantiating a driver if the tests associated with the active platforms don't need them.
  • To enable instantiation of drivers by plug-ins that require target-specific drivers (e.g. - AndroidDriver), I added a new method to the DriverPlugin interface that returns a constructor for the associated driver class.
  • I revised the definition and realization of the @PageUrl annotation to add support for Android application "activities".
  • I implemented and applied a platform set for the unit tests. This enabled me to implement a test class and page model for the first Android application unit test. Existing web application unit test classes have been revised to extend the new TestNgTargetRoot and JUnitTargetRoot classes, adding corresponding @TargetPlatform annotations to existing test methods,
  • I wrapped calls to commands that aren't supported by Appium drivers to catch UnsupportedCommandException.
  • I tweaked the code that locates the Appium main script to ignore potential preamble (info and warning messages).
  • I updated a few deprecated references to the TimeUnit class to their Duration class equivalents.
  • I added a skipTest method to the TestBase class to provide a framework-agnostic mechanism for aborting a test.
  • I removed a few explicit class references to static methods within the same class.
  • I pared down the debug message posted by DataUtils.fromString to omit the exception stack frames.
  • I removed workaround code in the ExamplePageServlet class for a Selenium 2 Grid issue.
  • I updated GridUtilityTest.testIsActive to work with the new activation behavior of local Grid instances.
  • I also removed a couple of deprecated methods and references to the Selenium 2 API in documentation and code comments.

Build for Java 8; upgrade dependencies and plugins

12 Jun 03:45
Compare
Choose a tag to compare

In this release, I finally dropped support for Java 7. By building this library for Java 8, I'm able to upgrade dependencies to newer versions that resolve identified vulnerabilities.

Upgrade to the latest release of HtmlUnitDriver

03 Jun 04:09
Compare
Choose a tag to compare

In this release, I upgraded HtmlUnitDriver to the latest release (2.62.0).

Move Executor [commons-exec] up to base grid dependencies

23 May 05:28
Compare
Choose a tag to compare

In this release, I moved the Executor dependency context declaration from the plugin classes up to the common grid dependency contexts.

Find/verify path to driver executable, populate property

22 May 06:56
Compare
Choose a tag to compare

In this release, I added code to verify the path to the driver executable if specified in the associated System property, or to search the PATH for the executable if it's not specified. This change was applied for the following driver plugins: ChromePlugin, EdgePlugin, FirefoxPlugin, OperaPlugin, and SafariPlugin.

Add support for simple servlet containers (node-less Grid hubs)

20 May 19:27
Compare
Choose a tag to compare

In this release, I removed the requirement that Selenium Grid hub servers must have nodes attached to them. This change was motivated by the realization that the ability of Selenium Grid servers to host Java servlets is a useful standalone feature, facilitating rapid deployment of web service endpoints and web pages (like the Example page used by the Selenium Foundation unit tests).