Appium: 1.7.1
Platform: IOS
Language: Java
Hi,
We are using annotation locator expressions, where we can’t transfer some XPath locators to a faster method.
The elements’ structural form is following:
Parent [A] : XCUIElementTypeCell
[A] has child [B] : XCUIElementTypeStaticText
[A] has child [C] : XCUIElementTypeButton
Please note, the [B] and [C] are on the same level in a hierarchy, they both are under the [A].
We need to reach to the child element [C], but the [C] can be found by [B], so we are searching [A] which contains [B] to get the [C].
The locator expression looks like this:
@iOSXCUITFindBy(xpath = “//XCUIElementTypeCell[./XCUIElementTypeStaticText[contains(@name,‘B’)]]/XCUIElementTypeButton[contains(@name,‘C’)]”)
Could you please help to convert that XPath slow and not recommended method to some other faster locator method so to replaced it in annotation expression.
Thanks
created
Dec '17
last reply
Dec '17
- 2
replies
- 321
views
- 1
user
- 2
links