Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get AbstractMethodError when I pass DesiredCapabilities to createWebDriver(); #9

Open
thephilwells opened this issue Jun 10, 2014 · 1 comment

Comments

@thephilwells
Copy link
Contributor

I'm trying to do this:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("name", testName);

Driver = SeleniumFactory.createWebDriver(capabilities);

And here is the error I get:

java.lang.AbstractMethodError: com.saucelabs.selenium.client.factory.spi.SeleniumFactorySPI.createWebDriver(Lcom/saucelabs/selenium/client/factory/SeleniumFactory;Ljava/lang/String;Lorg/openqa/selenium/remote/DesiredCapabilities;)Lorg/openqa/selenium/WebDriver;
    at com.saucelabs.selenium.client.factory.SeleniumFactory.createWebDriverInstance(SeleniumFactory.java:320)
    at com.saucelabs.selenium.client.factory.SeleniumFactory.createWebDriverInstance(SeleniumFactory.java:303)
    at com.saucelabs.selenium.client.factory.SeleniumFactory.createWebDriver(SeleniumFactory.java:109)
    at com.Driver.get(Driver.java:209)

Seems to be stemming from this abstract class in SeleniumFactorySPI.java:

public abstract WebDriver createWebDriver(SeleniumFactory factory,String browserURL, DesiredCapabilities capabilities);

Here are the versions I'm using:

    <dependency>
        <groupId>com.saucelabs.selenium</groupId>
        <artifactId>sauce-ondemand-driver</artifactId>
        <version>2.8</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>com.saucelabs.selenium</groupId>
        <artifactId>selenium-client-factory</artifactId>
        <version>2.13</version>
    </dependency>
@rossrowe
Copy link
Contributor

Hi Phil, can you try use the same version for both dependencies, eg.

<dependency>
    <groupId>com.saucelabs.selenium</groupId>
    <artifactId>sauce-ondemand-driver</artifactId>
    <version>2.13</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>com.saucelabs.selenium</groupId>
    <artifactId>selenium-client-factory</artifactId>
    <version>2.13</version>
    <scope>test</scope>
</dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants