skyisle / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
1 stars 0 forks source link

Can Espresso work when we have only apk and not the source code of the application? #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I do have only the apk to write the test cases. Can I use Espresso for this? 
You can find the attached java file that just invokes the target application on 
Android Device.
I have changed the signature of the target application to be same as my test 
application.
Since I further want to perform UI events on Buttons, how can I use 
"R.id.englishBtn" in the test application as I don't have the source code. The 
test application will not recognize 'R' here. 
In other words, how can I access a particular view on screen without using 'Id'?
The application is being executed on Android 4.1.2/Samsung S3.

Original issue reported on code.google.com by khushboo...@3pillarglobal.com on 2 Dec 2013 at 7:56

Attachments:

GoogleCodeExporter commented 9 years ago
You can use view matchers that don't need an R.id (such as withText and 
withContentDescription).

Original comment by vale...@google.com on 16 Dec 2013 at 6:14