I’m using Robotium for some test automation for an Android application. It’s great, but the maintenance is huge.
My application is localized into 20 languages, I’m compiling my application string resources into my test APK (that contains the logic for running my automated tests) and using the strings to find menu items etc. to click at run time. This is in line with an example I found on the Robotium project page on Google Code.
For example,
solo.clickOnText(res.getString(R.string.settings_menu));
The problem I’m having is that the strings may change daily in early builds of my product.
Is there any way I can use the string ID’s as opposed to the actual strings in order to click on items? These would be unique across all languages, and I wouldn’t have the high maintenance costs I currently have.
TIA.
You can use the resource ids of the views that you want to interact with. An example is: