2 years ago

#45352

test-img

Gian Lim

Need help navigating the virtual scene programmatically on emulator

I am trying to create automated tests for our app using UIAutomator. Part of our tests involves scanning multiple QR codes. I found a way to load a the QR code images to the virtual scene using this solution: Android emulator camera custom image

However, I need to navigate the inside the scene in order to scan the intended QR code. Manually, I can navigate by holding option + WASD or option + mouse movement but I wish to do in automatically using code.

virtual scene image

I have tried looking into work arounds like sending keystrokes for the mentioned keys above, or manipulating the x,y,z rotation coordinates of the emulator to move the view, but to no avail.

android-studio

kotlin

android-emulator

android-uiautomator

0 Answers

Your Answer

Accepted video resources