Anyone please tell me the command to verify whether the option is enabled or disabled using Monkey-talk.
Asked
Active
Viewed 612 times
2 Answers
1
You should be looking at the .enabled property is true or false. Here is an example:
Button login_button Verify 1 .enabled
Button login_button Verify 0 .enabled

jmolls
- 26
- 1
0
Two ways:
Search for the button name in the component tree and see the state whether it is visible / hidden.
If there is a button named "LOGIN", the mt command, "Button LOGIN Verify" will check whether LOGIN button is visible on the screen. If it is visible on the screen, it returns "Completed Script Playback - OK". If LOGIN button is hidden or not available in the activity, then returns, "FAILURE: Unable to find Button(LOGIN)".

user1278366
- 21
- 2
-
Yes we can verify that the button is visible on the screen or not, but how can we verify the button is enabled or not. For example in Login screen there is "Login" button, it should be enabled only after entering the username and password in the fields, otherwise it should be disabled..like it should be present in the screen but it should be grayed out. – Tester77 Feb 21 '14 at 05:28