In my application that I’m testing I have an option to send feedback to the customer.
When I use that option, the gmail opened and then I kind of ‘locked outside’ of my application.
Of course the query(“*”)
returns '[]' and the command press_back_button
gives me the error above.
Looking around and found some solutions with root the device.
For me it is out of the question – we are developing apps for our customers and as a QA manager I cannot test different environment than the end client.
So, I’m using adb shell commands:
system("adb shell input text 'this%sis%san%sexample' ")
system("adb shell input keyevent 66")
---for enter
system("adb shell input keyevent 4")
----for go back
system("adb shell input keyevent 27")
--- to take a picture.
(the entire list you can find here - ADB Shell Input Events)
But, I work blindness here.
Is there an adb shell commands equivalent for ‘query’?