osama-raddad/android-test-kit

Support clicking on links in TextViews

Closed this issue · 3 comments

What steps will reproduce the problem?
1. Create a TextView with text that includes a Url, setting the autoLink=true 
property on the TextView.
2. There's no way to specify the link should be clicked on, instead of the 
entire view, which does not activate the link.

To be fair, I can't find a way of doing in raw Instrumentation either, and 
Robotium simply clicks on the View when you use solo.clickOnText()

But this is, nonetheless, needed, to check if linking to external websites, 
dialling numbers, opening others app, etc works well. 

(A solution in Instrumentation would be welcome, too.)

Original issue reported on code.google.com by my.name....@gmail.com on 7 Mar 2014 at 1:27

There doesn't seem to be any way to get coordinates of a URLSpan. Best we could 
do is invoke the click method on the element directly.

Original comment by vale...@google.com on 7 May 2014 at 7:12

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

Original comment by vale...@google.com on 7 May 2014 at 7:12

  • Changed state: Accepted
Fixed in Espresso 2.0

Original comment by vale...@google.com on 20 Dec 2014 at 4:33

  • Changed state: Fixed