0

just posting the same question posted on Stackoverflow: https://stackoverflow.com/questions/77614973/appium-android-how-to-click-on-spannable-text

I have a screen that contains a TextView, the text view text is composed of a SpannableStringBuilder which in turn appends a URLSpan.

I'd like to write an Appium test to click on that specific URLSpan part of the text .

Searching online has led me to solutions that include tapping on specific coordinates, like this one.

I'm looking for a more reliable solution if possible, I've tried APIs such as AppiumBy.linkText and AppiumBy.partialLinkText but without success.

Also the testing project has the capability UiAutomator2 only. I can imagine that it can be achieved with the Espresso capability as well, but really would like to find a solution with the UiAutomator capability only if possible.

Thank you

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.