When Executing Automation on Android real device, the expected action is different from actions when performed manually

Hey there,

Manual Execution:
I have a scenario where I uninstall an App on the device, I get a window : Do you want to uninstall - Select ‘OK’ or ‘CANCEL’

Executing Automated code:
When I run the code where I uninstall the app on the device , I DO NOT see the window "Do you want to uninstall Select ‘OK’ or ‘CANCEL’.

Any thoughts?

Regards
Priya

Hi @Priyap ,

How do you uninstall the App? Is it by using…

  1. driver.removeApp(“packageName”); or
    2)by command:- adb uninstall packageName…?

Apparently, we’ll not get any popups (e.g. Do you want to uninstall - Select ‘OK’ or ‘CANCEL’) while automating the both.

Regards,
Bhaskar.

@bhaskar

I dont use any of the above 2 commands. The way it works is, this app that im using is internally developed that is used to enroll the device into the server. After I enroll the device using this app, the device appears on our server.
One of the used case is, I send a delete device command from our whatever internal server is, the expected behaviour is, the device triggers the App to uninstall.

When I do this manually -> that is I delete the device from the server, - on the device, the app prompts to un-install the app.

When I do this automatically, I do not get the prompt to uninstall, but it simply re-sets the app. I do have reset app set to false.

so both automated or manually, I should not manually uninstall the app. The server prompts to uninstall. And I expect the app to prompt to uninstall. This is not an app issue as I dont have any issues when I manually do it

Regards
Priya

As of now , i didn’t get scenario like your’s…!! Sorry I can’t help you out.