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

Can not run tests with new serenity versions (1.5.4-rc.1 - 1.5.5) #897

Closed
livastar opened this Issue Aug 22, 2017 · 32 comments

Comments

Projects
None yet
6 participants
@livastar

livastar commented Aug 22, 2017

Hi to all,
I've tried to run my tests with new serenity versions as 1.5.5 and 1.5.4-rc.2.
Appium server didn't show any logs, it seems that serenity and appium don't talk.

Also, I've tried to run with 1.5.4-rc.1 and app started but appium logs stop before the first step.

Note:
I'm running my tests with 1.5.0-rc.1 and java-client 5.0.0-BETA8

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Aug 22, 2017

Contributor

Serenity doesn't interact with Appium, Selenium does, so it is most likely a dependency conflict between Selenium and Appium. Have you tried with Serenity 1.5.3 (which uses Selenium 3.4.0)?

Contributor

wakaleo commented Aug 22, 2017

Serenity doesn't interact with Appium, Selenium does, so it is most likely a dependency conflict between Selenium and Appium. Have you tried with Serenity 1.5.3 (which uses Selenium 3.4.0)?

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Aug 22, 2017

I'm running my tests with 1.5.0-rc.1 and java-client 5.0.0-BETA8 and Selenium 3.0.1 and it works well for me. When I change only the selenium version to 3.4.0, at first steps when the app starts I'm presented with this error:
org.openqa.selenium.support.ui.Wait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;

livastar commented Aug 22, 2017

I'm running my tests with 1.5.0-rc.1 and java-client 5.0.0-BETA8 and Selenium 3.0.1 and it works well for me. When I change only the selenium version to 3.4.0, at first steps when the app starts I'm presented with this error:
org.openqa.selenium.support.ui.Wait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Aug 22, 2017

Contributor

This sounds like a dependency conflict between Selenium 3.4 or 3.5.1 and Appium - the error you are getting is to do with different Guava dependencies. Selenium 3.4 (or guava, more precisely) has breaking changes in recent versions, so upgrading will be tricky until they update the Appium libraries.

Contributor

wakaleo commented Aug 22, 2017

This sounds like a dependency conflict between Selenium 3.4 or 3.5.1 and Appium - the error you are getting is to do with different Guava dependencies. Selenium 3.4 (or guava, more precisely) has breaking changes in recent versions, so upgrading will be tricky until they update the Appium libraries.

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Aug 22, 2017

Hi guys,
@mykola-mokhnach
@jlipps
Do you know anything about this?

livastar commented Aug 22, 2017

Hi guys,
@mykola-mokhnach
@jlipps
Do you know anything about this?

@mykola-mokhnach

This comment has been minimized.

Show comment
Hide comment
@mykola-mokhnach

mykola-mokhnach Aug 22, 2017

java_client is a separate project, which is maintained by @SrinivasanTarget and @TikhomirovSergey

mykola-mokhnach commented Aug 22, 2017

java_client is a separate project, which is maintained by @SrinivasanTarget and @TikhomirovSergey

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Aug 22, 2017

Thanks @mykola-mokhnach for reply :)

livastar commented Aug 22, 2017

Thanks @mykola-mokhnach for reply :)

@mykola-mokhnach

This comment has been minimized.

Show comment
Hide comment
@mykola-mokhnach

mykola-mokhnach Aug 22, 2017

BTW, @wakaleo is right regarding guava - @livastar make sure you use the most recent version as a dependency.

mykola-mokhnach commented Aug 22, 2017

BTW, @wakaleo is right regarding guava - @livastar make sure you use the most recent version as a dependency.

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Aug 22, 2017

I've tried with latest guava (23.0 and 22.0 and 21.0) and Selenium (3.4.0; 3.5.1; and 3.5.2) and java-client (BETA8 and BETA9) and Serenity (1.5.5, 1.5.4, 1.5.4-rc.2, 1.5.4-rc.1) but with no results. :(

livastar commented Aug 22, 2017

I've tried with latest guava (23.0 and 22.0 and 21.0) and Selenium (3.4.0; 3.5.1; and 3.5.2) and java-client (BETA8 and BETA9) and Serenity (1.5.5, 1.5.4, 1.5.4-rc.2, 1.5.4-rc.1) but with no results. :(

@mykola-mokhnach

This comment has been minimized.

Show comment
Hide comment
@mykola-mokhnach

mykola-mokhnach Aug 22, 2017

It is possible some third-party package still uses old guava as a dependency. Go through the list of them and make sure it's really up to date and no old versions of it are present in the list of project dependencies.

mykola-mokhnach commented Aug 22, 2017

It is possible some third-party package still uses old guava as a dependency. Go through the list of them and make sure it's really up to date and no old versions of it are present in the list of project dependencies.

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Aug 22, 2017

Contributor

Serenity uses the latest version of Selenium (3.4+), which uses the latest version of Guava. It looks like Appium uses an older version of Guava, which is not compatible with the latest version of Selenium. Since both Guava and Selenium have breaking API changes in recent versions, the only option is to wait for the Appium library to be updated.

Contributor

wakaleo commented Aug 22, 2017

Serenity uses the latest version of Selenium (3.4+), which uses the latest version of Guava. It looks like Appium uses an older version of Guava, which is not compatible with the latest version of Selenium. Since both Guava and Selenium have breaking API changes in recent versions, the only option is to wait for the Appium library to be updated.

@amedvedjev

This comment has been minimized.

Show comment
Hide comment
@amedvedjev

amedvedjev Aug 22, 2017

how about to try ?

        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>5.0.0-BETA9</version>
            <exclusions>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.5.2</version>
            <scope>compile</scope>
        </dependency>

fix coming :-) - appium/java-client#699

amedvedjev commented Aug 22, 2017

how about to try ?

        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>5.0.0-BETA9</version>
            <exclusions>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.5.2</version>
            <scope>compile</scope>
        </dependency>

fix coming :-) - appium/java-client#699

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Aug 28, 2017

Contributor

The latest version (1.5.7) uses selenium 3.5.2 - could you try with this version?

Contributor

wakaleo commented Aug 28, 2017

The latest version (1.5.7) uses selenium 3.5.2 - could you try with this version?

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Sep 22, 2017

@wakaleo I've tried to use:
java-client: 5.0.0-BETA8
selenium-java: 3.5.2
serenity-core: 1.5.7
the appium doesn't starts .
It seems that the problem is in integration between selenium, serenity and java-client?
Am I right? @wakaleo, @mykola-mokhnach, @TikhomirovSergey

livastar commented Sep 22, 2017

@wakaleo I've tried to use:
java-client: 5.0.0-BETA8
selenium-java: 3.5.2
serenity-core: 1.5.7
the appium doesn't starts .
It seems that the problem is in integration between selenium, serenity and java-client?
Am I right? @wakaleo, @mykola-mokhnach, @TikhomirovSergey

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Sep 22, 2017

Contributor

The latest version (serenity-core: 1.5.11) is built with selenium 3.5.2 and java-client 5.0.2. The next version will be built with selenium 3.5.3 and java-client 5.0.3.

Selenium 3.5.x uses Java 8 Function classes instead of Guava, and if your client code (or a dependency) is built for an older version of Selenium, you could get an error like the one you mention above.

Contributor

wakaleo commented Sep 22, 2017

The latest version (serenity-core: 1.5.11) is built with selenium 3.5.2 and java-client 5.0.2. The next version will be built with selenium 3.5.3 and java-client 5.0.3.

Selenium 3.5.x uses Java 8 Function classes instead of Guava, and if your client code (or a dependency) is built for an older version of Selenium, you could get an error like the one you mention above.

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Sep 22, 2017

Selenium 3.5.x uses Java 8 Function classes instead of Guava, and if your client code (or a dependency) is built for an older version of Selenium, you could get an error like the one you mention above.

It's about explicit waits only?

livastar commented Sep 22, 2017

Selenium 3.5.x uses Java 8 Function classes instead of Guava, and if your client code (or a dependency) is built for an older version of Selenium, you could get an error like the one you mention above.

It's about explicit waits only?

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Sep 22, 2017

Contributor

I don't recall if that is the only place they are used in the Selenium APIs.

Contributor

wakaleo commented Sep 22, 2017

I don't recall if that is the only place they are used in the Selenium APIs.

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Sep 26, 2017

Contributor

Could you try with serenity-core 1.6.0?

Contributor

wakaleo commented Sep 26, 2017

Could you try with serenity-core 1.6.0?

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Sep 27, 2017

@wakaleo hi. :) I've tried to run with serenity 1.6.0; java-client 5.0.3, and selenium 1.5.3

here are the logs from appium server:
https://gist.github.com/livastar/3fbc036c79d36c9c7e0dba1cd50d2a2b

The thing is that Test Case is failing on first step on tapOnElement

Here are the logs from Serenity in IntelliJ :)
https://gist.github.com/livastar/97fbaa1e9438a5dea2ce572462243c16

livastar commented Sep 27, 2017

@wakaleo hi. :) I've tried to run with serenity 1.6.0; java-client 5.0.3, and selenium 1.5.3

here are the logs from appium server:
https://gist.github.com/livastar/3fbc036c79d36c9c7e0dba1cd50d2a2b

The thing is that Test Case is failing on first step on tapOnElement

Here are the logs from Serenity in IntelliJ :)
https://gist.github.com/livastar/97fbaa1e9438a5dea2ce572462243c16

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Sep 27, 2017

Contributor

Thanks for trying it out. Serenity 1.6.0 is built against Appium 5.0.3 and selenium 3.5.3, so the libraries should not be conflicting. Your test seems to fail with a NPE on line 226 of the ContentTest class. Is this your class?

Contributor

wakaleo commented Sep 27, 2017

Thanks for trying it out. Serenity 1.6.0 is built against Appium 5.0.3 and selenium 3.5.3, so the libraries should not be conflicting. Your test seems to fail with a NPE on line 226 of the ContentTest class. Is this your class?

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Oct 17, 2017

Contributor

Have you tried with version 1.6.6?

Contributor

wakaleo commented Oct 17, 2017

Have you tried with version 1.6.6?

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Oct 17, 2017

Hi @wakaleo,
I've tried with serenity 1.6.6; the latest java-client (5.0.4); and the latest selenium (3.6.0).
BUT no success. :) The same, thing. Page Objects are returning null

livastar commented Oct 17, 2017

Hi @wakaleo,
I've tried with serenity 1.6.6; the latest java-client (5.0.4); and the latest selenium (3.6.0).
BUT no success. :) The same, thing. Page Objects are returning null

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Oct 17, 2017

Contributor

I think this might be due to a known bug with the Appium client, that we have seen elsewhere - are you using the Appium @findby annotations in your Page Objects?

Contributor

wakaleo commented Oct 17, 2017

I think this might be due to a known bug with the Appium client, that we have seen elsewhere - are you using the Appium @findby annotations in your Page Objects?

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Oct 17, 2017

Contributor

Could you try forcing the version of Appium client to 5.0.4?

Contributor

wakaleo commented Oct 17, 2017

Could you try forcing the version of Appium client to 5.0.4?

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Oct 17, 2017

I've tried with serenity 1.6.6; the latest java-client (5.0.4); and the latest selenium (3.6.0).

Or I misunderstood something.

livastar commented Oct 17, 2017

I've tried with serenity 1.6.6; the latest java-client (5.0.4); and the latest selenium (3.6.0).

Or I misunderstood something.

@wakaleo

This comment has been minimized.

Show comment
Hide comment
@wakaleo

wakaleo Oct 17, 2017

Contributor

Sorry, didn't see your comment fully above.

Contributor

wakaleo commented Oct 17, 2017

Sorry, didn't see your comment fully above.

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Oct 17, 2017

CC: @TikhomirovSergey, @mykola-mokhnach
I'm using
@AndroidFindBy:
@AndroidFindBy(id = "action_skip")
public WebElementFacade skipButton;)
By
public static final By CHANNEL_IMAGE = By.id("channel_image");
public WebElementFacade channelImage() {
return returnElement(CHANNEL_IMAGE);
}

livastar commented Oct 17, 2017

CC: @TikhomirovSergey, @mykola-mokhnach
I'm using
@AndroidFindBy:
@AndroidFindBy(id = "action_skip")
public WebElementFacade skipButton;)
By
public static final By CHANNEL_IMAGE = By.id("channel_image");
public WebElementFacade channelImage() {
return returnElement(CHANNEL_IMAGE);
}

@cliviu

This comment has been minimized.

Show comment
Hide comment
@cliviu

cliviu Oct 17, 2017

Contributor

hi @livastar , maybe this issue can help : #925 ,
try to extend your PageObject from the following class:

public class AppiumPageObject extends PageObject {
  public AppiumPageObject(WebDriver driver) {
      super(driver);
      PageFactory.initElements(new AppiumFieldDecorator(((WebDriverFacade) getDriver()).getProxiedDriver(),
              this.getImplicitWaitTimeout().in(TimeUnit.SECONDS), TimeUnit.SECONDS), this);
  }
}


Contributor

cliviu commented Oct 17, 2017

hi @livastar , maybe this issue can help : #925 ,
try to extend your PageObject from the following class:

public class AppiumPageObject extends PageObject {
  public AppiumPageObject(WebDriver driver) {
      super(driver);
      PageFactory.initElements(new AppiumFieldDecorator(((WebDriverFacade) getDriver()).getProxiedDriver(),
              this.getImplicitWaitTimeout().in(TimeUnit.SECONDS), TimeUnit.SECONDS), this);
  }
}


@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Oct 18, 2017

@cliviu :) no results :(

livastar commented Oct 18, 2017

@cliviu :) no results :(

@vikramvi

This comment has been minimized.

Show comment
Hide comment
@vikramvi

vikramvi Dec 7, 2017

Member

@livastar can you try my sample project https://github.com/vikramvi/AppiumSerenityPOC and let us know if you still face any issues

Member

vikramvi commented Dec 7, 2017

@livastar can you try my sample project https://github.com/vikramvi/AppiumSerenityPOC and let us know if you still face any issues

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Dec 15, 2017

Hi to all :)
Thanks for your all input. @wakaleo, @vikramvi , @amedvedjev, @mykola-mokhnach, @cliviu
We've resolved this by replacing all
@AndroidFindby(id = "action_skip")
public WebElementFacade skipButton;)

by
public static final By CHANNEL_IMAGE = By.id("channel_image");
public MobileElement channelImage() {
return returnElement(CHANNEL_IMAGE);}

In some cases that when we need WebElementFacade, we just casting this.

livastar commented Dec 15, 2017

Hi to all :)
Thanks for your all input. @wakaleo, @vikramvi , @amedvedjev, @mykola-mokhnach, @cliviu
We've resolved this by replacing all
@AndroidFindby(id = "action_skip")
public WebElementFacade skipButton;)

by
public static final By CHANNEL_IMAGE = By.id("channel_image");
public MobileElement channelImage() {
return returnElement(CHANNEL_IMAGE);}

In some cases that when we need WebElementFacade, we just casting this.

@vikramvi

This comment has been minimized.

Show comment
Hide comment
@vikramvi

vikramvi Dec 18, 2017

Member

@livastar why you need to use above technique ? Is PageFactory broken ?

Why error are you getting ?

Member

vikramvi commented Dec 18, 2017

@livastar why you need to use above technique ? Is PageFactory broken ?

Why error are you getting ?

@livastar

This comment has been minimized.

Show comment
Hide comment
@livastar

livastar Dec 18, 2017

@vikramvi something with "Your PageObject is looking doggy"

livastar commented Dec 18, 2017

@vikramvi something with "Your PageObject is looking doggy"

@wakaleo wakaleo closed this Dec 18, 2017

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