-
Notifications
You must be signed in to change notification settings - Fork 2
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
findLabelAtIndex with iOS sets type "XCUIElementTypeStaticText" #17
Comments
Hi @scsmith5593 , Thanks for reaching out! The apps I've been testing have the labels as text, instead of images, so when the library looks for labels, it's assuming text. We should be able to add functionality to look at the element type when an existing Test Object is provided. |
Hi, Chris, Got it. I thought that might be the case. Thanks. |
Create enum for object types to make logic for type checking easier.
Hi @scsmith5593 , If you want to check out version 1.13.0, I think it will address the issue you saw with finding image elements at an index: https://github.com/detroit-labs/katalon-mobile-util/releases/tag/1.13.0 https://github.com/detroit-labs/katalon-mobile-util#finding-an-element-from-a-list-by-index Specifically, now you would use something like this:
Please let me know if you have any issues getting this to work for your situation. |
Hi, I tried it out and it works just as expected--thanks! Very helpful. |
Hi,
Having a problem with findLabelAtIndex. I've created a new Label TestObject with type=XCUIElementTypeImage and name=detail-disclosure (as those are the type and name of the objects in the list I'm testing). When I run my test using findLabelAtIndex, the element isn't found and I see in the logs:
[35m[HTTP]�[39m �[90m{"using":"xpath","value":"(//[@type='XCUIElementTypeStaticText' and @name='detail-disclosure'])[6]"}�[39m
WARNING: Logger is not initialized. No log file will be written.
Would have logged:
Could not find any list elements matching xpath: (//[@type='XCUIElementTypeStaticText' and @name='detail-disclosure'])[6]
Not sure where XCUIElementTypeStaticText came from or why it's not using the type I set in the object: XCUIElementTypeImage.
Katalon Studio version: 6.2.2
Appium Version: 1.12.1
Thanks for any help/further info you can provide.
The text was updated successfully, but these errors were encountered: