Monday, 19 August 2013

Get the text of the textView selected using Robotium

Get the text of the textView selected using Robotium

I am automating a product using robotium. I need to do some dat validation
kind of task there.
Scenario is like:
We click on a list, select some items in the list and do some operation.
I want to put the names of the items selected into an array. Such that i
can compare it later.
I used the following code:
for(i=0; i<=n;i++) {
solo.clickInList(i); Array1[i]=solo.getText(i).toString(); }
But sadly, this statement is not extracting the text of the textView
selected but the id of the textView.
Please help me by giving an example of how to get the text of the TextView
selected. At a fix!!

No comments:

Post a Comment