samedi 11 juin 2016

How do I get Robotium to recognise views on other fragments?

The Background

I am having trouble with robotium when testing an activity with 3 fragments
The problem is that Robotium will recognise my EditTexts on the first fragment
eg
solo.clearEditText(0);
solo.enterText(0, "Maltese Falcon");
The first fragment has 3 EditTexts on it so when I get to the first EditText in the next fragment I think that it would be referenced by the number 3 reasoning that the first fragment has EditTexts 0 to 2 and the next fragment has EditTexts 3 to ?

The Problem

But that is not the way it works the 2nd fragment's EditTexts cannot be referenced by any number for example
solo.clearEditText(3);
solo.enterText(3, "Main Sheet"); Does Not Work

I also make reference to this similar question

Aucun commentaire:

Enregistrer un commentaire