stephenwang1011 / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

How to check or set wait till the button is enabled. #194

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
What is the best way to wait till the button is enabled?
Currently when I invoke solo.searchText(""), it does find the button and clicks 
on it, but the button is disabled. So the click really doesn't happen.
So I am setting solo.sleep(10000) and then invoke solo.clickOnText(""). 
But setting this sleep might not be a good idea as the button might not be 
enabled in that time. So the test fails.

Want to check if there is a better approach on how to wait or sleep till the 
button is enabled.

Original issue reported on code.google.com by koneru.s...@gmail.com on 9 Dec 2011 at 6:33

GoogleCodeExporter commented 9 years ago
Use: solo.getText().isEnabled(). And wait until it returns true back.

Original comment by renasr...@gmail.com on 13 Dec 2011 at 6:10

GoogleCodeExporter commented 9 years ago
It always returns true.

Original comment by LuBC...@gmail.com on 2 Apr 2015 at 7:23