Hello community,
I testing the trial version of Ranorex to see what everything Ranorex is able to automate in mobile area. I am using Ranorex ver. 8.3.0
Currently I am blocked with automation of system dialogs. I am testing Android native app. I have 2 types of system dialogs in the application:
A) Run-time permission dialog
B) Open file dialog
The scenario for both is simple: Main application screen > Open action bar menu > Click on option 1 in case to invoke run-time permission dialog or Click on option 2 in case to invoke Open file dialog
Actual result: I am able to invoke both types of dialogs but once the dialog is opened I am not able to click on any element on it
I am able to detect the elements from both activities (Tested app and AndoidOS) via RanorexSpy and drag-drop them to repository of items. Then I can add the touch action step on them. However when executing the test the test fails on: Failed to find item.
Note: The settings "Android OS Automation = True", Screenshots on AndoidOS = False
My question is: Is Ranorex able to interact with system dialogs? Is Ranorex able to switch between steps interacting with AndroidOS elements and steps interacting with tested app elements?
According the closed topic here in forum viewtopic.php?f=23&t=9926&p=40022&hilit ... pup#p40022 seems that I can only test System app or tested app. Do I understand it correctly?
Attached:
Android - system dialog interaction
Android - system dialog interaction
You do not have the required permissions to view the files attached to this post.
Re: Android - system dialog interaction
hey,
it seems like the link you mentioned in your post already provided the answer:
regards, qwertzu
it seems like the link you mentioned in your post already provided the answer:
Seems like this is the reason why you are facing this issue.So if you have an instrumented application in foreground you can only do automation on this application, therefore you are not able to click on an android system popup.
regards, qwertzu
Re: Android - system dialog interaction
Hello qwertzu,
question is that in case the system dialog is invoked (popped up) I would expect that in this moment the Andoid OS is on foreground so Ranorex will continue with clicking on it. According my quick testing seems that Ranorex cannot switch between tested app and Android OS in one test-case.
I wanted to have confirmation that it is the known limitation of Ranorex and the issue is not in me (that I missed some settings, or I use some wrong approach)
I have raised the issue also on Support, waiting for more info.
question is that in case the system dialog is invoked (popped up) I would expect that in this moment the Andoid OS is on foreground so Ranorex will continue with clicking on it. According my quick testing seems that Ranorex cannot switch between tested app and Android OS in one test-case.
I wanted to have confirmation that it is the known limitation of Ranorex and the issue is not in me (that I missed some settings, or I use some wrong approach)
I have raised the issue also on Support, waiting for more info.
Re: Android - system dialog interaction
Hi,
I already suggested below link via PM, but I think it may be interesting also for other people, fighting this Android security issue:
viewtopic.php?f=23&t=11117&p=44755#p44806
As it seems, ADB commands are the only workaround for Android security popups? But it would be interesting to hear more regarding this problem from Ranorex support
I already suggested below link via PM, but I think it may be interesting also for other people, fighting this Android security issue:
viewtopic.php?f=23&t=11117&p=44755#p44806
As it seems, ADB commands are the only workaround for Android security popups? But it would be interesting to hear more regarding this problem from Ranorex support
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Android - system dialog interaction
Hello guys,
Thanks for cooperation.
I got the response directly from Ranorex support (Thomas Gruber) to this issue:
Automating these is not possible using Ranorex for security reasons. Android blocks us of doing so. Otherwise it would be possible that Ranorex could interact with the internal system settings of the device from the outside. You always have to manually use these dialogs.
I have already raised the question to confirm it is possible via ADB. I will keep you updated once I get the answer.
Thanks for cooperation.
I got the response directly from Ranorex support (Thomas Gruber) to this issue:
Automating these is not possible using Ranorex for security reasons. Android blocks us of doing so. Otherwise it would be possible that Ranorex could interact with the internal system settings of the device from the outside. You always have to manually use these dialogs.
I have already raised the question to confirm it is possible via ADB. I will keep you updated once I get the answer.
Re: Android - system dialog interaction
Hello participants,
FYI - posting the latest response from support. However no concrete answer about supporting system dialogs interaction via ADB:
In general, it is a security feature of Android that it is not possible to simply automate the Android UI in order to gain additional permissions. (That’s similar to Captchas, some of our customers also want to automate those, while their sole purpose is to not be automatable…) That said, I am not a professional for adb, and as far as I know, adb allows you to do a lot of things, even clicking Android system dialogs. Of course, you can use adb within Ranorex code modules.
FYI - posting the latest response from support. However no concrete answer about supporting system dialogs interaction via ADB:
In general, it is a security feature of Android that it is not possible to simply automate the Android UI in order to gain additional permissions. (That’s similar to Captchas, some of our customers also want to automate those, while their sole purpose is to not be automatable…) That said, I am not a professional for adb, and as far as I know, adb allows you to do a lot of things, even clicking Android system dialogs. Of course, you can use adb within Ranorex code modules.