Ios - alternative way to find element by partial link text?

Hey guys,

I am trying to find iOS element by its text, i tried both byPartialLinkText or byLinkText, they are not working.

org.openqa.selenium.UnsupportedCommandException: Invalid locator strategy: partial link text (WARNING: The server did not provide any stacktrace information)

What is the other alternative way to do the same thing? Thanks!

Some other information:
I have configurate accessiblity ID and label in xcode. so the app displayed text now cannot be seen in the inspector.

I believe you are using Java, so I’ll do it in that. Strategy is the ‘tags’ Appium command:

for (WebElement cell : tags("UIATableCell")) {
  if (cell.getAttribute("name").contains("partialName")) {
    cell.click;
  }
}

You might want to methodize and just return the cell you are looking for and then do whatever action on it.

1 Like

Thanks for you reply!

HI @appiumfan
Can you please tell me the above code is working for you.

Thanks in Advance