Hello,
I am using Windows 7 and Ranorex version 6.0.2
When I "spy" my android application with Ranorex Spy, the listed elements (texts, buttons, lists ...etc) don't have their ressource id displayed in the Ranorex software (the ressource-id field is always displayed as empty). I tried with all the different instrumentation settings.
Please note, when I "spy" my android application with the uiautomatorviewer of Android SDK, I can see the ressource id of every elements defined by the developer. So I know that the ressource id of these elements exists.
With Ranorex Spy, I would like to be able to get the ressource id of the elements of my Android application in order to write precise Xpath with the ressource id of the element.
But as Ranorex Spy can't see the ressource id, I can't build such type of Xpath even if I know their ressource id (known thanks to uiautomatorviewer of Android SDK.)
Note that, if I use the KeyPassDroid Android application sample with Ranorex Spy, the ressource id of Android elements are displayed, and Xpath are automatically created with the ressource id of the element.
As the uiautomatorviewer of Android SDK is able to see the ressource id, why Ranorex Spy cannot find the ressource id of the elements ?
I am not allowed not post any snapshot of my Android application in this public forum (If you ask me to, could you please give me an address email where I can sent it to you).
Thank you very much.
Cannot get the ressource id of Android elements with Ranorex
-
- Posts: 7
- Joined: Fri Aug 19, 2016 10:56 am
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Cannot get the ressource id of Android elements with Ranorex
Hello CataTester,
I assume that you use a custom R.id package. If this is the case, you will need to provide a custom class name for locating resource ids (for example, com.ranorex.demo.R). By default Ranorex will search the id in <manifestpackage>.R.
This option needs to be declared during the instrumentation process in the settings dialog.
Please do let me know if this resolves the issue.
Sincerely,
Johannes
I assume that you use a custom R.id package. If this is the case, you will need to provide a custom class name for locating resource ids (for example, com.ranorex.demo.R). By default Ranorex will search the id in <manifestpackage>.R.
This option needs to be declared during the instrumentation process in the settings dialog.
Please do let me know if this resolves the issue.
Sincerely,
Johannes
You do not have the required permissions to view the files attached to this post.
-
- Posts: 7
- Joined: Fri Aug 19, 2016 10:56 am
Re: Cannot get the ressource id of Android elements with Ranorex
Hello Johannes,
Yes, thank you, this solves perfectly my problem.
The developers of the application are using a custom path for the ressources (which is not the package name of the application).
Now, I am able to get the ressource id of the elements and I can write precise Xpath with the ressource id of these elements.
Again, thank you.
Yes, thank you, this solves perfectly my problem.
The developers of the application are using a custom path for the ressources (which is not the package name of the application).
Now, I am able to get the ressource id of the elements and I can write precise Xpath with the ressource id of these elements.
Again, thank you.
Re: Cannot get the ressource id of Android elements with Ranorex
We use a custom R.id package for our project as well. We were able to find our rIDs after adding in our custom R.id package name. Unfortunately, we have some button elements that are defined by the Android framework itself and not by application. The IDs for these buttons are blank.
Can we specify multiple custom R.id packages when instrumenting our app via the Wizard?
Can we specify multiple custom R.id packages when instrumenting our app via the Wizard?
-
- Posts: 34
- Joined: Thu May 19, 2016 4:52 pm
Re: Cannot get the ressource id of Android elements with Ranorex
This solution work for automating firefox apk mobile?
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: Cannot get the ressource id of Android elements with Ranorex
Hi diogogmaio,
What do you mean? Native browsers are not supported by Ranorex. Please be more specific.
Cheers,
Robin
What do you mean? Native browsers are not supported by Ranorex. Please be more specific.
Cheers,
Robin
Re: Cannot get the ressource id of Android elements with Ranorex
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