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

NPE to locate elements on iOS real device native app testing for latest serenity version #964

Closed
ibmer921150 opened this issue Oct 10, 2017 · 5 comments

Comments

@ibmer921150
Copy link

Problem:
It is working fine to use serenity version around 1.5.0 (including appium java-client 4.xx). I upgraded serenity version to latest 1.6.3 since I'd like to use mobileby.iOSNsPredicate method which is new method in appium java-client 5.xx. But NPE to locate elements on iOS real device native app testing for latest serenity version.

Some Error logs:
java.lang.NullPointerException
at xxx.pages.FacebookMobileIOSPage.user1_login(FacebookMobileIOSPage.java:122)
at xxx.pages.FacebookMobileIOSPage$$EnhancerByCGLIB$$b57675be.CGLIB$user1_login$0()
at xxx.pages.FacebookMobileIOSPage$$EnhancerByCGLIB$$b57675be$$FastClassByCGLIB$$3c0cbdcb.invoke()
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at net.thucydides.core.steps.BaseMethodRunner.invokeMethod(BaseMethodRunner.java:10)
at net.thucydides.core.steps.NormalMethodRunner.invokeMethodAndNotifyFailures(NormalMethodRunner.java:20)
at net.thucydides.core.steps.StepInterceptor.runNormalMethod(StepInterceptor.java:307)
at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:125)
at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61)
at xxx.pages.FacebookMobileIOSPage$$EnhancerByCGLIB$$b57675be.user1_login()
at xxx.bddtestsuits.FacebookLinkificationMobileIOSTestCase.facebook_user_login_successfully_on_mobile_ios(FacebookLinkificationMobileIOSTestCase.java:49)
at ✽.Given facebook user1 login successfully on mobile ios(xxx/facebook_linkification.feature:6)

@ibmer921150
Copy link
Author

@wakaleo
Hi John or other contributors,

I can get few information for serenity mobile native app testing. May I know if serenity is still in POC stage for mobile native app testing?

Thanks

@wakaleo
Copy link
Member

wakaleo commented Oct 10, 2017

Serenity has been used for many years with Appium, but the latest Appium APIs have made breaking changes and/or contain bugs. A community member is working on a comprehensive test suite and upgrade

@dbirch-cognitoiq
Copy link
Contributor

dbirch-cognitoiq commented Oct 26, 2017

@wakaleo Would this be expected to be a problem for hybrid app testing on Android as well, or just a native iOS thing?

I just upgraded to latest versions of appium and Serenity and I'm also seeing a NPE the first time I try to access any elements in my app, wondering if it could be related to this and I should pick older versions or raise an issue here (or with appium!)

@wakaleo
Copy link
Member

wakaleo commented Oct 26, 2017

Possibly, it seems to be an issue with the Appium client API as a whole.

@dbirch-cognitoiq
Copy link
Contributor

Hmm interesting, I just rolled back my appium client API to 4.1.2 and I'm still getting the NPE, I know this worked with Serenity 1.2.4.

Am I just trying to use incompatible versions (and are the compatible versions documented anywhere) or could it be it's an issue with serenity?

Seems to be my WebElementFacade is null when I'm trying to access it from my first Page Object.

Should I move this into a new issue and stop hogging this issue thread?

@wakaleo wakaleo closed this as completed Feb 12, 2022
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

3 participants