-
-
Notifications
You must be signed in to change notification settings - Fork 759
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
@iOSXCUITFindBy element lookup uses 'id' instead of 'accessibility id' for Page Factory annotations on an IOSElement and fails to find it (native app) #683
Comments
Hi, I am also facing the same problem. I am on Appium: 1.7.0. Please help Thanks |
For me the log shows "id", however, it treats the value as "accessibility id", so it still finds the right element. |
Any updates on this issue? |
I have the same bug as well. I had to modify my MobileElements to be the same as accessibility id in IOS app =)
or in another case it will not work. My Appium java-client version is:
Please look into that as seems we are blocked in case if there is no ID for element (xpath only for example). |
Same issue, the variable name is used instead of the annotation parameter, using java-client 7.0.0. |
I had the same issue and found the solution: Explanation here: |
@tobizwetz even capabilities.setCapability("automationName", "XCUITest") is not working.. any other work arounds> |
I had this problem to, but only on appium java client version 7.3.0. |
I can confirm the same for @AndroidFindBy too. 7.2.0:
7.3.0:
|
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 java-client/src/main/java/io/appium/java_client/pagefactory/AppiumFieldDecorator.java Line 91 in 6cd31e2
|
platformName must be a string according to the standard: https://w3c.github.io/webdriver/#capabilities |
Having the same issue with "iOSXCUITFindBy" when the platformName = "tvOS". Still going through/trying to understand the code but looks like TVOS was not handle in "buildMobileNativeBy" method of https://github.com/appium/java-client/blob/v7.1.0/src/main/java/io/appium/java_client/pagefactory/DefaultElementByBuilder.java if (isIOSXcuit() || isIOS()) { ////Should we have istvOS() Appium 1.17.1 |
@iOSXCUITFindBy is working fine when the platformName = "tvOS" once i make following changes. It would be of great help if any of the contributors can review and implement the same.
if (isIOSXcuit() || isIOS() || isTVOS()) { Thanks |
Anyone can please help me how to use xpath with @iOSXCUITFindBy Anyone can please help me in this? |
Description
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
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
The text was updated successfully, but these errors were encountered: