Hi together,
we want in our test report display the iOS-Version of the used test device.
Is it possible to get the iOS-Version of the test device during runtime and how could I access on it in my usercode?
I have searched for this number on the device with ViewSpy and I found an attribute in my mobile app called OSVersion but the string is "iOS 0.0.0".
Thanks for help.
Kind regards,
Joerg
How to get the iOS-Version of my testdevice
-
- Posts: 55
- Joined: Fri May 24, 2013 12:57 pm
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to get the iOS-Version of my testdevice
Hello Joerg,
Which version of Ranorex is installed on your machine?
This should be possible in our current version.
Regards,
Bernhard
Which version of Ranorex is installed on your machine?
This should be possible in our current version.
You can use the "OSVersion" property in order to get the OS-Version at runtime. Please take a look at the online API documentationIs it possible to get the iOS-Version of the test device during runtime and how could I access on it in my usercode?
Regards,
Bernhard
-
- Posts: 55
- Joined: Fri May 24, 2013 12:57 pm
Re: How to get the iOS-Version of my testdevice
Hello Bernhard,
we use the latest version of Ranorex (4.1.2.16100) with the latest version of the agent in our iOS-app.
I could get the OS-version of Windows, where Ranorex is running ...
... but I don't know how to get the OS-version of my iOS-test device during runtime and when I look on my test device with ViewSpy I only found 0.0.0 as OSVersion of my mobile device which isn't correct.
Regards,
Joerg
we use the latest version of Ranorex (4.1.2.16100) with the latest version of the agent in our iOS-app.
I could get the OS-version of Windows, where Ranorex is running ...
Code: Select all
Report.Info("OS-Version: " + Host.Local.OSVersion);
Joerg
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to get the iOS-Version of my testdevice
Hello Joerg,
You have to use the MobileApp class as described in the code snippet below, but the main problem is that you don't get the correct version string.
Unfortunately I cannot reproduce the issue. It works properly on our devices. Which kind of device are you using.
Bernhard
You have to use the MobileApp class as described in the code snippet below, but the main problem is that you don't get the correct version string.
Unfortunately I cannot reproduce the issue. It works properly on our devices. Which kind of device are you using.
var mobileAppRepoElement = repo.YourMobileApp; MobileApp MyApp = MobileApp(mobileAppRepoElement ); MyApp.OSVersion();Regards,
Bernhard
-
- Posts: 55
- Joined: Fri May 24, 2013 12:57 pm
Re: How to get the iOS-Version of my testdevice
Hi Bernhard,
thanks for help. We are testing on an iPad and iPhone with iOS7.x.
I now inserted your code but I still don't get the iOS-Version out of my device.
Here the rebuilded code snippet:
Here the report result:
Regards,
Joerg
thanks for help. We are testing on an iPad and iPhone with iOS7.x.
I now inserted your code but I still don't get the iOS-Version out of my device.
Here the rebuilded code snippet:
Code: Select all
Element mobileAppRepoElement = repo.YourMobileApp.mobileApp.Element;
MobileApp myApp = new MobileApp(mobileAppRepoElement);
Report.Info("OS-Version: " + myApp.OSVersion);
Joerg
You do not have the required permissions to view the files attached to this post.
-
- Posts: 55
- Joined: Fri May 24, 2013 12:57 pm
Re: How to get the iOS-Version of my testdevice
Hi together,
are there any news to this topic?
Regards,
Joerg
are there any news to this topic?
Regards,
Joerg
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to get the iOS-Version of my testdevice
Hello Joerg,
I have an additional question. Is your device added via WIFI or via USB?
Can you please try to add the device via WIFI and check if the issue also occurs.
Regards,
Bernhard
I have an additional question. Is your device added via WIFI or via USB?
Can you please try to add the device via WIFI and check if the issue also occurs.
Regards,
Bernhard
-
- Posts: 55
- Joined: Fri May 24, 2013 12:57 pm
Re: How to get the iOS-Version of my testdevice
Hi Bernhard,
I use the device on both ways and I have for each connection a separate device in Ranorex.
I tried both ways again and it doesn't matter on which way the device is connected.
The problem occurs on both ways.
During the test of both ways only one device was active and the other disabled via the "Ranorex Device Manager".
Regards,
Joerg
I use the device on both ways and I have for each connection a separate device in Ranorex.
I tried both ways again and it doesn't matter on which way the device is connected.
The problem occurs on both ways.
During the test of both ways only one device was active and the other disabled via the "Ranorex Device Manager".
Regards,
Joerg
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to get the iOS-Version of my testdevice
Hello Joerg,
Our development team found a bug in Ranorex, which could cause the issue. The bug will be fixed in one of our next releases. Unfortunately there is no workaround at the moment.
Regards,
Bernhard
Our development team found a bug in Ranorex, which could cause the issue. The bug will be fixed in one of our next releases. Unfortunately there is no workaround at the moment.
Regards,
Bernhard
-
- Posts: 55
- Joined: Fri May 24, 2013 12:57 pm
Re: How to get the iOS-Version of my testdevice
Hi Bernard,
thanks for the info.
Best regards,
Joerg
thanks for the info.
Best regards,
Joerg
-
- Posts: 13
- Joined: Wed Apr 09, 2014 5:18 pm
Re: How to get the iOS-Version of my testdevice
Element mobileAppRepoElement = repo.YourMobileApp.mobileApp.Element;
MobileApp myApp = new MobileApp(mobileAppRepoElement);
Report.Info("OS-Version: " + myApp.OSVersion);
Can some one suggest what do repo.YourMobileApp.mobileApp.Element; line signifies?
What does YourMobileApp refers to?
MobileApp myApp = new MobileApp(mobileAppRepoElement);
Report.Info("OS-Version: " + myApp.OSVersion);
Can some one suggest what do repo.YourMobileApp.mobileApp.Element; line signifies?
What does YourMobileApp refers to?
Re: How to get the iOS-Version of my testdevice
It is the base repository object for the application under test.
The line you are asking about gets a reference to the actual element in the application under test that is being pointed to by the repo object "mobileApp".
repo -> The instantiated Ranorex Repository.
YourMobileApp -> (Made up name) The name of the root app object in the repo.
mobileApp -> (Made up name) The name of a repo object based under YourMobileApp.
The line you are asking about gets a reference to the actual element in the application under test that is being pointed to by the repo object "mobileApp".
repo -> The instantiated Ranorex Repository.
YourMobileApp -> (Made up name) The name of the root app object in the repo.
mobileApp -> (Made up name) The name of a repo object based under YourMobileApp.
Shortcuts usually aren't...