-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
is @AndroidFindBy not working? #92
Comments
Please read this: |
PageFactory.initElements(driver, this); This invocation uses DefaultFieldDecorator (https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/support/pagefactory/DefaultFieldDecorator.java). It doesn't decorate fields marked by @AndroidFindBy or @iOSFindBy. Please try this: PageFactory.initElements(new AppiumFieldDecorator(driver),
pageObject //an instance of PageObject.class
); |
Getting Null Pointer Exception on line (String company = companyName.getText();) plz provide some solution, its blocker for me. public LoginPage(AndroidDriver driver) {
|
@Anand093 can you open new issue instead of commenting on closed one ? This way your issue will get noticed and tracked properly |
@Anand093 |
@narendra-chandratre Before using @AndroidFindBy in page object class write below lines. Hope it will solve your problem, plz let me know if it solves ur issue public PageObjectClassName(AndroidDriver driver) { Note-> I am using appium 1.6.4 |
Still failing :( |
@narendra-chandratre
|
Appium 1.6.4 and all above dependancies are you able to run Page Objects and Page Factory comfortably for Android & iOS? |
Android, its working perfectly, ios i dint try |
Actually I am still trying to make it work but last hope is to downgrade the appium version :( |
Check with the 1.6.4 and mine pom dependencies, i think it should work, even i struggled with this alot, but finally it worked for me. Below are few helps, if u can get anything out of it. import statements import io.appium.java_client.MobileElement; Capablities public static AndroidDriver getAppCapablities(String device, String ip){ PageObject Class public YourPageObjectClass(AndroidDriver driver) {
Below is the test class from where you are trying to use page object class components. driver = Capablities.getAppCapablities(device_name, IP2); |
Env:
java-client:1.6.1
Appium:v1.2.0
1:Create class PageObjects
2:Create class FolderPage:
3. my test code:
error
My question: why is @AndroidFindBy not working?
when i use @findby ,it is ok!
The text was updated successfully, but these errors were encountered: