Question

I am getting an expected pop up, I know what text it will have and what buttons will it have. I want to click on one of the buttons.

Once I get to the pop up screen, I see some text and 3 buttons. My test passes if I use
Solo.searchButton("Text") or Solo.searchText("Text").

The problem is when I do Solo.ClickOnButton ("Text") or solo.clickOnText("Text").

I tried using solo.getViews(); but still running into same error.

No button or text with "Text" is found.

Was it helpful?

Solution

I was able to overcome this by using solo.getView()

            View donebtn = solo.getView(R.id.pop_up_button);
            solo.clickOnView(donebtn);

OTHER TIPS

Try using longclick instead of just clickonbutton. And is the message that pops up within the same package as your activity thats under test?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top