I'm using Robotium to test a screen containing ImageButton switches in an Android app. I have two ImageButtons that use two PNG images (on.png and off.png) to display the state of the switches. I'm trying to find a method that will return the file name of the currently displayed image so I can run a test like:
Get the image being displayed by ImageButton1
Verify that the image is "on.png"
Set ImageButton1 to editable state
Select ImageButton1
Get the image being displayed by ImageButton1
Verify that the image is "off.png"
How do I verify that the correct image file is being displayed by the ImageButton in the correct situation?
BTW, the image is being set in the XML element.