26573

Selenium WebDriver 3.0.1 Actions class missing from selenium-api-3.0.1.jar from Maven repository

Question:

I am using Selenium WebDriver 3.0.1 in a Maven based project. This code snippet fails (does not compile):

Actions myActions = new Actions(myWebDriver);

because the org.openqa.selenium.interactions.Actions class is missing from the selenium-api-3.0.1.jar downloaded from maven. This is the relevant portion of the pom.xml:

<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-firefox-driver</artifactId> <version>3.0.1</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-support</artifactId> <version>3.0.1</version> <type>jar</type> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-api</artifactId> <version>3.0.1</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-htmlunit-driver</artifactId> <version>2.52.0</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-remote-driver</artifactId> <version>2.31.0</version> </dependency>

I also tested this alternative dependency in pom.xml:

<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server</artifactId> <version>3.0.1</version> </dependency>

but in both cases the org.openqa.selenium.interactions.Actions class is missing from the downloaded selenium-api artifact.

Searching the class in Maven repository with grepcode.com finds only version 2.47.1 or older.

I downloaded the Selenium Client & WebDriver Language Bindings zip package directly from the <a href="http://www.seleniumhq.org/download/" rel="nofollow">http://www.seleniumhq.org/download/</a> url and the included client-combined-3.0.1-nodeps.jar file does contain the org.openqa.selenium.interactions.Actions class.

It seems that I am missing something ... but I really have no idea how to fix the Maven dependency. Any help will be enthusiastically accepted!

Answer1:

Seems like the org.openqa.selenium.interactions package, including the Actions class, got moved to selenium-remote-driver.

You can either add a dependency to selenium-remote-driver directly, or, even simpler, add a dependency to to selenium-java (that depends on selenium-chrome-driver which in turn depends on selenium-remote-driver). I would try to go with the latter option as this should allow you to get rid of a lot of other explicit dependencies as well.

Recommend

  • Celery + Redis - .get() hangs indefinitely after running smoothly for ~70 hours
  • lein uberjar doesn't pack the jar file under resource into the final jar
  • ServiceStack Handler Not Found When Periods Present in Path
  • Displaying and sizing a grayscale from a QImage in Qt
  • How to set default security access for a Page Type in Silverstripe?
  • JENKINS: ERROR when I try to use an older JDK for a specific maven project
  • Get Users in Group from Azure AD via Microsoft Graph
  • Grails 3 - How to publish to Artifactory
  • Maven, ActionBarSherlock v4 and Roboguice v2 - How do I get it to build?
  • Regarding client side code generation from WSDL
  • How can I create one checksum of two files in Maven to use it in the name of a directory
  • signer not valid error
  • How to force Composer to download a local package?
  • maven jboss-as:start A required class was missing … org/sonaty…/ArtifactResolutionException
  • How do you create a Fuseki SPARQL server using the Apache Jena Java API?
  • “mvn clean generate-source” could not resolve dependencies
  • Why must we declare a variable name when adding a method to a struct in Golang?
  • Python ImageIO Gif Set Delay Between Frames
  • nodemcu custom firmware build problems
  • Silverlight DependencyProperty.SetCurrentValue Equivalent
  • Access Android Market through SSH tunnel
  • Textfile Structure (tables)
  • Play WS (2.2.1): post/put large request
  • Jetty Server not starting: Unable to establish loopback connection
  • The plugin 'org.apache.maven.plugins:maven-jboss-as-plugin' does not exist or no valid ver
  • Control modification in presentation layer
  • req.body is undefined - nodejs
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • Deserializing XML into class C#
  • Is there a mandatory requirement to switch app.yaml?
  • How to include full .NET prerequisite for Wix Burn installer
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • Easiest way to encapsulate a HTML5 webpage into an android app?
  • Busy indicator not showing up in wpf window [duplicate]
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • java string with new operator and a literal