-
-
Notifications
You must be signed in to change notification settings - Fork 154
Closed
Milestone
Description
Previous find_exact/s/text/s/button/s search words which match with name, value and label attributes like the following attributes. This method is based on UIAutomation script directly.
def string_visible_contains(element, value)
contains = {
target: value,
substring: true,
insensitive: true
}
{
typeArray: [element],
onlyVisible: true,
name: contains,
label: contains,
value: contains
}
endIn XCUITest, this library used :xpath strategy before 9.1.3 to find elements. But the results differ from UIAutomation. (e.g. button's tests)
In 9.1.3+, button/s and test/s use find_elements :name, "something" to avoid using xpath to improve the performance. But this results not same as previous one yet. e.g. button's test
I think, we should use elements not only name but also label and value.( in WDA, they are
- How to improve
- get elements with
find_elements :name, "something"and check theirlabelandvalue,visibilityattributes in ruby script.- WDA can search identifier with
:name,:id,accessibility idor-ios predicate string. xcuitest-driver, WDA - So, we can check other attributes after getting elements.
- WDA can search identifier with
- use
: predicateinstead of UIAutomation script directly.
Metadata
Metadata
Assignees
Labels
No labels