0

Is it possible to find a view according to it TextView text and then go to previously or next view and use (touch etc) it using AndroidViewClient?

In the application I'm trying to automate there is a list of items each have check-box, text and setup icon. All the check-box and setup icons have the same resource id and can be distinguished by TextView text only. So I need the ability to find this unique TextView text on a view and then be able to jump to the next/previous view in the hierarchic tree.

Can this be done with AndroidViewClient or I need to look for solutions like here?

Community
  • 1
  • 1
Prophet
  • 32,350
  • 22
  • 54
  • 79
  • In the meantime I succeeded to find a view by TextView text. I can also catch the formerly found view parent. Parent view has (in my case) 3 childrens: 1 is a check-box, 2 text 3 setup. Need to get the child number 1 and number 3. The question now is how can I get child inside parent using AndroidViewClient..... – Prophet May 04 '14 at 11:48
  • Finally I wrote a function performing all the above for me ;) – Prophet May 05 '14 at 14:52

1 Answers1

2

Well you can set the text string to the tag object of the textview then you can get that text view by calling findViewWithTag("the text of the text view ") ...

hope this will help you.

M.Khouli
  • 3,992
  • 1
  • 23
  • 26
  • It's OK but I'm asking about using AndroidViewClient specifically, is this possible using that script & if yes once I found the view with desired TextView text to go to the next or previously view. – Prophet May 04 '14 at 08:52