@iOSXCUITFindBy element lookup uses 'id' instead of 'accessibility id' for Page Factory annotations on an IOSElement and fails to find it (native app)
See original GitHub issueDescription
The variable name assigned to an IOSElement in Page Factory annotation is used to lookup the element instead of the actual annotation locator provided.
Logs show
[HTTP] --> POST /wd/hub/session/3ade3d73-6606-484d-a752-6decdab285d3/element {"using":"id","value":"subtitle"}
as opposed to
[HTTP] --> POST /wd/hub/session/3ade3d73-6606-484d-a752-6decdab285d3/element {"using":"accessibility id","value":"activationLink"}
when @iOSFindBy is used
Environment
- java client build version or git revision if you use some shapshot: 5.0.0 BETA9
- Appium server version or git revision if you use some shapshot: 1.6.5/Latest Desktop
- Desktop OS/version used to run Appium if necessary: macOS10.12.6
- Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: Appium.app 1.1.1
- Mobile platform/version under test: iOS 10.3
- Real device or emulator/simulator: real device
Details
ActivationLinkPage: https://gist.github.com/squeemish/251504367c13caa16ef04336c75cfb4c Driver/Appium creation: https://gist.github.com/squeemish/7c77faaa839b5d7ffcb82f9d1515d05b POM with system properties: https://gist.github.com/squeemish/fd8f80dfd1e5730d471f9179a4183cf0
Ecxeption stacktraces
https://gist.github.com/squeemish/c6d64fa082f5d3c1a7775bae2303d030
Link to Appium logs
https://gist.github.com/squeemish/eac632e9b22836a436f500c460306914
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (1 by maintainers)
Top GitHub Comments
Updates:
When use
I hit the issue/
When use
It works properly even with 7.3.0
May is happens because this check looks for
String.class
: https://github.com/appium/java-client/blob/6cd31e2b2eb979bea389918ac42f5b7ed6c40b60/src/main/java/io/appium/java_client/pagefactory/AppiumFieldDecorator.java#L91Same issue, the variable name is used instead of the annotation parameter, using java-client 7.0.0.