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

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

Closed
welnanick opened this Issue Aug 17, 2017 · 10 comments

Comments

Projects
None yet
6 participants
@welnanick

welnanick commented Aug 17, 2017

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.

@jason-edstrom

This comment has been minimized.

Show comment
Hide comment
@jason-edstrom

jason-edstrom Aug 18, 2017

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

jason-edstrom commented Aug 18, 2017

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

@QAutomatron

This comment has been minimized.

Show comment
Hide comment
@QAutomatron

QAutomatron Aug 18, 2017

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'
    }
}

QAutomatron commented Aug 18, 2017

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'
    }
}
@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget

SrinivasanTarget Aug 18, 2017

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?

Member

SrinivasanTarget commented Aug 18, 2017

@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?

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
Member

SrinivasanTarget commented Aug 18, 2017

@welnanick

This comment has been minimized.

Show comment
Hide comment
@welnanick

welnanick Aug 18, 2017

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.

welnanick commented Aug 18, 2017

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.

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget

SrinivasanTarget Aug 18, 2017

Member

Cool thanks. will investigate further.

Member

SrinivasanTarget commented Aug 18, 2017

Cool thanks. will investigate further.

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget
Member

SrinivasanTarget commented Aug 18, 2017

@Brian-Watson

This comment has been minimized.

Show comment
Hide comment
@Brian-Watson

Brian-Watson Aug 18, 2017

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

Brian-Watson commented Aug 18, 2017

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

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget
Member

SrinivasanTarget commented Aug 19, 2017

@TikhomirovSergey TikhomirovSergey referenced this issue Aug 20, 2017

Merged

#696 FIX #699

2 of 4 tasks complete
@TikhomirovSergey

This comment has been minimized.

Show comment
Hide comment
@TikhomirovSergey

TikhomirovSergey Aug 24, 2017

Member

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

Member

TikhomirovSergey commented Aug 24, 2017

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

SrinivasanTarget added a commit to SrinivasanTarget/java-client that referenced this issue Sep 3, 2017

appium#696 FIX:
 - changes from the appium#698
 - selenium-java was updated to 3.5.1
 - org.apache.commons-lang3 was updated to 3.6
 - org.springframework.spring-context was updated to 4.3.10.RELEASE
 - the element genering was improved. appium#696 FIX
 - some improvements of AppiumDriver#context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment