I am working on automation of an image editing application and using Android Espresso as the framework. Please guide me How to pinch and zoom (gestures) an Image view in Android Espresso test
You don't have methods in Espresso for that but you can use UiAutomator objects to perform these actions.
UiDevice myDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
myDevice.findObject(new UiSelector().text("element text to be found")).pinchIn(); //to zoom in
myDevice.findObject(new UiSelector().text("element text to be found")).pinchOut(); //to zoom out
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With