I would like to click the first three records one by one in a table. So I used the below iOS Predicate method to click but getting Nosuch element exception.
I did search a lot in google to figure out the correct syntax but apparently not succeed yet. Any assistance?
Note: The name/id/value are dynamic and hence can’t be predetermined. Also I wish to not go with XPATH due to performance issue.
Mobile: IOS Native App. Appium: 1.8.2 Java client: 6.1.0
Exception:
cucumber.runtime.CucumberException: org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters.
Method:
public static void ClickusingPredicateString(String selector) {
driver().findElement(MobileBy.iOSNsPredicateString(selector)).click();
}
Element(under for loop to increment the record position):
type == ‘XCUIElementTypeCell[1]’ AND visible==1
type == ‘XCUIElementTypeCell[2]’ AND visible==1
type == ‘XCUIElementTypeCell[2]’ AND visible==1