Skip to content

Warning: Selenium 3.5.1 breaks java client 5.0.0-BETA9 #696

Closed

Description

@welnanick

I am using gradle to handle dependencies for my project. In my build.gradle I have testCompile "io.appium:java-client:5.0.0-BETA9" to compile the appium java client. It seems Selenium 3.5.1 was just released (their website has not been updated as I am writing this), and for some reason gradle is grabbing version 3.5.1 automatically for selenium-api, selenium-remote-driver, and selenium-support. I don't know why this is happening, but it is and it breaks the java client. I had to add

compile ('org.seleniumhq.selenium:selenium-api:3.4.0'){force = true}
compile ('org.seleniumhq.selenium:selenium-remote-driver:3.4.0'){force = true}
compile ('org.seleniumhq.selenium:selenium-support:3.4.0'){force = true}

to fix my project.

So, if your project just suddenly stopped working for no reason whatsoever, check if these packages were updated, and if so make sure to force version 3.4.0 for them.

Activity

  1. jason-edstrom commented on Aug 18, 2017

    @jason-edstrom

    I just solved this exact issue on my setup. Same resolution approach, forcing 3.4.0.

  2. QAutomatron commented on Aug 18, 2017

    @QAutomatron

    Faced the same problem. Thank you for a solution.

    I tried a different one, it also helps:

    configurations.all {
        resolutionStrategy {
            force 'org.seleniumhq.selenium:selenium-support:3.4.0',
                    'org.seleniumhq.selenium:selenium-api:3.4.0'
        }
    }
    
  3. SrinivasanTarget commented on Aug 18, 2017

    @SrinivasanTarget
    Member

    @QAutomatron @welnanick @jason-edstrom Whats the actual problem faced here? What breaks with 3.5.1? Gonna hands-on anyways tomorrow. Is it only with gradle?

  4. SrinivasanTarget commented on Aug 18, 2017

    @SrinivasanTarget
    Member
  5. welnanick commented on Aug 18, 2017

    @welnanick
    Author

    It seems annotations (or possibly all FindBy operations given the changes in selenium) break. When testing android, elements populated using @AndroidFindBy stay null, and when testing iOS elements populated using @iOSFindBy cause org.openqa.selenium.WebDriverException

    Unfortunately I am not in a position to investigate further, nor confirm whether it is just presenting itself with gradle or not.

  6. SrinivasanTarget commented on Aug 18, 2017

    @SrinivasanTarget
    Member

    Cool thanks. will investigate further.

  7. SrinivasanTarget commented on Aug 18, 2017

    @SrinivasanTarget
    Member
  8. Brian-Watson commented on Aug 18, 2017

    @Brian-Watson

    I'm seeing this for my Android tests after the Selenium 3.5.1 upgrade...

    org.openqa.selenium.remote.RemoteWebElement cannot be cast to io.appium.java_client.MobileElement

    Where my code is attempting this...

    MobileElement foundElement = (MobileElement) wait.until(ExpectedConditions.presenceOfElementLocated(this.getLocator()));

    Note: I'm not using PageFactory

  9. SrinivasanTarget commented on Aug 19, 2017

    @SrinivasanTarget
    Member
  10. added a commit that references this issue on Aug 24, 2017
  11. TikhomirovSergey commented on Aug 24, 2017

    @TikhomirovSergey
    Contributor

    The fix is here #699. It will be published on the nearest (26.08.2017 - 27.08.2017) weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions