Refenz
Refenz

Reputation: 1

Hom press second button with id:inf?

I use Testdroid, it based on junit3. Command:

solo.clickOnView(solo.findViewById("cc.app.R.id.inf"));

open first button with id:inf

  1. what command need use to press on second(third and more) button with id:inf.
  2. how select area/layout, where junit try found element with id:inf, something like that:

Here use command to chose LinearLayout by index and then

solo.clickOnView(solo.findViewById("cc.app.R.id.inf"));

enter image description here

Upvotes: 0

Views: 29

Answers (1)

maszter
maszter

Reputation: 3720

You can get/find LinearLayout view by index with methods:

getView(int id,int index)
getView(Class<T> viewClass, int index)
...

Then you can use method(s):

getViews(android.view.View parent)
getCurrentViews(Class<T> classToFilterBy, android.view.View parent)

which returns list of views, so filtering must be done by your code/helper method.

Upvotes: 0

Related Questions