{"action":"created","issue":{"url":"https://api.github.com/repos/RobotiumTech/robotium/issues/299","labels_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/299/comments","events_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/299/events","html_url":"https://github.com/RobotiumTech/robotium/issues/299","id":101945521,"number":299,"title":"Testing that an OptionsMenu item is disabled","user":{"login":"renas","id":165541,"avatar_url":"https://avatars.githubusercontent.com/u/165541?v=3","gravatar_id":"","url":"https://api.github.com/users/renas","html_url":"https://github.com/renas","followers_url":"https://api.github.com/users/renas/followers","following_url":"https://api.github.com/users/renas/following{/other_user}","gists_url":"https://api.github.com/users/renas/gists{/gist_id}","starred_url":"https://api.github.com/users/renas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renas/subscriptions","organizations_url":"https://api.github.com/users/renas/orgs","repos_url":"https://api.github.com/users/renas/repos","events_url":"https://api.github.com/users/renas/events{/privacy}","received_events_url":"https://api.github.com/users/renas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/bug","name":"bug","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/wontfix","name":"wontfix","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-08-19T16:54:00Z","updated_at":"2015-08-19T16:55:02Z","closed_at":null,"body":"_From [glenview...@gmail.com](https://code.google.com/u/110087215095127878251/) on January 30, 2012 11:52:18_\n\nAs far as I can tell, there is presently no way to determine if an OptionsMenu item is enabled or disabled.  I thought I'd as a workaround try to use clickOnMenuItem to ensure that the application ignored the \"press\" of a disabled button, but the test fails when the item is (correctly) disabled.  \r\n\r\njunit.framework.AssertionFailedError: The text: Disabled Button is not found!\r\nat com.jayway.android.robotium.solo.Clicker.clickOnText(Clicker.java:279)\r\nat com.jayway.android.robotium.solo.Clicker.clickOnMenuItem(Clicker.java:200)\r\n...\r\n\r\nIf you have any workaround ideas, I'm open to them.  Otherwise, please add this feature when you can.  Thanks so much!\n\n_Original issue: http://code.google.com/p/robotium/issues/detail?id=220_"},"comment":{"url":"https://api.github.com/repos/RobotiumTech/robotium/issues/comments/132693939","html_url":"https://github.com/RobotiumTech/robotium/issues/299#issuecomment-132693939","issue_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/299","id":132693939,"user":{"login":"renas","id":165541,"avatar_url":"https://avatars.githubusercontent.com/u/165541?v=3","gravatar_id":"","url":"https://api.github.com/users/renas","html_url":"https://github.com/renas","followers_url":"https://api.github.com/users/renas/followers","following_url":"https://api.github.com/users/renas/following{/other_user}","gists_url":"https://api.github.com/users/renas/gists{/gist_id}","starred_url":"https://api.github.com/users/renas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renas/subscriptions","organizations_url":"https://api.github.com/users/renas/orgs","repos_url":"https://api.github.com/users/renas/repos","events_url":"https://api.github.com/users/renas/events{/privacy}","received_events_url":"https://api.github.com/users/renas/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T16:55:02Z","updated_at":"2015-08-19T16:55:02Z","body":"_From [glenview...@gmail.com](https://code.google.com/u/110087215095127878251/) on January 31, 2012 11:55:37_\n\nYou know--I'm not sure what's going on.  Even the code below that I previously wrote works, is actually intermittent.  Same for the waitForText().  My application code is definitely functioning correctly, but the test code is not.  I'm using robotium 3.1.\r\n\r\nsolo.pressMenuItem(0) \r\nassertTrue(solo.waitForText(\"Disabled item\"))\r\nassertFalse(solo.getText(0).isEnabled())\r\nsolo.goBack()"}}