Object Spy can't work on Instrumented mode after "Open device" twice

On Appium studio (11.6.64) UI, choose one application and check “instrument” option, then press “Launch Application” button to open app on android device.

First, press “Open device” on Appium studio UI to reflect android UI, and press “Object Spy” button, object spy works on instrumented mode.

But when I close “Open device” reflect window, and secondly press “Open device” on Appium studio UI, then press “Object Spy” button, object spy works on non-instrumented mode.

Why does it not work on instrumented mode at second time?

BTW, I also found that if during android automation testing, this issue makes Instrumented mode on real device change to non-Instrumented mode.

Hi,

The reason why it doesn’t work on the second attempt is simply because once you’ve closed the reflection and opened again, the Launch command which you used the first time is not being used again, so you need to click on Launch again, otherwise it is expected to be in non instrumented mode.

As for during Automation Testing, you would need to set the capability like the following code in order to launch the application in instrumented mode:

dc.setCapability("instrumentApp", true);

Here is a little bit more about capabilities, hope it helps!

1 Like