qmetry / qaf

Quality Automation Framework for web, mobileweb, mobile native and rest web-service using Selenium, webdrier, TestNG and Java Jersey
https://qmetry.github.io/qaf
MIT License
250 stars 136 forks source link

 Unable to update appuim java_client with qaf + latest selenuim #172

Closed gryabov closed 12 months ago

gryabov commented 6 years ago

QAF Version

Note: only the latest version is supported

Steps To Reproduce

Appium client is looking for java.util.function.Function But qaf is linked to guava Functions

    <!-- selenium -->
    <dependency org="org.seleniumhq.selenium" name="selenium-remote-driver" rev="3.7.1" />
    <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="3.7.1" />
    <dependency org="org.seleniumhq.selenium" name="selenium-support" rev="3.0.0" force="true"/>

    <!-- Appium -->
             <dependency org="io.appium" name="java-client" rev="5.0.4" />

Expected behavior

No errors

Actual behavior

java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.FluentWait.until(Ljava/util/function/Function;)Ljava/lang/Object;

at io.appium.java_client.pagefactory.AppiumElementLocator.waitFor(AppiumElementLocator.java:76)
at io.appium.java_client.pagefactory.AppiumElementLocator.findElement(AppiumElementLocator.java:95)
at io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement.intercept(InterceptorOfASingleElement.java:61)
at io.appium.java_client.ios.IOSElement$$EnhancerByCGLIB$$d311658.isDisplayed(<generated>)
at com.mobile.pages.BasePage.lambda$waitForElements$2(BasePage.java:180)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:238)
at com.mobile.pages.BasePage.waitForElements(BasePage.java:177)
at com.mobile.pages.HomePage.isPageOpened(HomePage.java:46)
at com.mobile.pages.HomePage.<init>(HomePage.java:40)
at com.mobile.pages.Pages.homePage(Pages.java:15)
at com.mobile.tests.search.SearchByKeywordTest.verifyKeywordSearch(SearchByKeywordTest.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:643)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:806)
at org.testng.TestRunner.run(TestRunner.java:656)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)

Is the issue reproducible on runner?

Test case sample

Please, share the test case (as small as possible) which shows the issue

cjayswal commented 6 years ago

Can you share sample code you are using? it looks that you are not using wait service from qaf (methods available with QAFWebElement and QAFWebDriver)

gryabov commented 6 years ago

Yeah, you right I'm using custom wait functions. So, should I use WaitService for custom waits? It seems WaitService is deprecated.

BTW, How can turn this

@iOSFindAll({
            @iOSFindBy(accessibility = "item.someLabel"),
            @iOSFindBy(accessibility = "item.storeBanner"),
    })
    private MobileElement isOpened;

into loc locations.

cjayswal commented 6 years ago

Well, you can do that witout using iOSFindBy. Refer documentation. You can use alternate locater instead of iOSFindAll. For instance, it may look like

@FindBy(locator = "['accessibility id=item.storeBanner','accessibility id=item.someLabel']")
private QAFWebElement pageIndicator;

With QAFWebElement, you will get wait, assert and verify methods.

page.getPageIndicator().waitForPresent();

You didn't provided details about your page class. Make sure you have extended WebDriverTestPage.

Please utilize users group and help us to keep git issues for confirmed bug or feature request routed through users group.

gryabov commented 6 years ago

cjayswal, thank you for reply.

I will post to the user group.

cjayswal commented 6 years ago

can you check with latest qaf (2.1.14 RC1 or RC2)?

cjayswal commented 12 months ago

Closing inactive issue.