My Android tests (Ranorex 4.1.1) native android app running on S3. I have set of tests and each test starts the app, does something and closing the app. Randomly some tests will fail with the following error when app starts. Device still has 410.apk ranorex service installed. I did not see new 411.apk yet.
The app currently running on the device '' doesn't match the started app ''.
Show/Hide Stacktrace
at Ranorex.Plugin.Mobile.MobileDevice.StartAndInitDeviceApplication(AppInformation app) at Ranorex.Plugin.Mobile.MobileDevice.StartApplication(AppInformation app) at Ranorex.Host.RunMobileApp(String deviceDisplayName, String appName) at Elvis_Week_android.OpenSchedule_3.Ranorex.Core.Testing.ITestModule.Run() in c:\Users\Developer\Documents\Ranorex\RanorexStudio Projects\Elvis_Week_android\Elvis_Week_android\OpenSchedule_3.cs:line 82 at Ranorex.Core.Testing.TestSuiteModule.RunInternal(DataContext parentDataContext)
Thanks!
The app currently running on the device doesn't match
-
- Posts: 42
- Joined: Fri Oct 04, 2013 9:47 pm
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: The app currently running on the device doesn't match
Hello,
The current Ranorex Service app has version 4.1.0.
Have you instrumented your app using Ranorex 4.1.1?
How do you close your app?
Please try add a short delay before you restart your app?
Regards,
Markus (T)
The current Ranorex Service app has version 4.1.0.
Have you instrumented your app using Ranorex 4.1.1?
How do you close your app?
Please try add a short delay before you restart your app?
Regards,
Markus (T)
-
- Posts: 42
- Joined: Fri Oct 04, 2013 9:47 pm
Re: The app currently running on the device doesn't match
Yes, app is instrumented with 4.1.1
I close my app with: repo.ComSeedlabsElvisweek.MainActivity1.PressKeys("{BACK}");
After that Delay.Milliseconds(1000);
I close my app with: repo.ComSeedlabsElvisweek.MainActivity1.PressKeys("{BACK}");
After that Delay.Milliseconds(1000);
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: The app currently running on the device doesn't match
Hello,
Please try to close your app using 'Host.Local.CloseApplication()'.
You could try to increase the timeout to a higher value (e.g. 5000ms).
Regards,
Markus (T)
Please try to close your app using 'Host.Local.CloseApplication()'.
You could try to increase the timeout to a higher value (e.g. 5000ms).
Regards,
Markus (T)
-
- Posts: 42
- Joined: Fri Oct 04, 2013 9:47 pm
Re: The app currently running on the device doesn't match
Markus, I cannot edit or insert code to .cs file created by recording. I guess I need to add it somehow to the second file ...UserCode.cs where I can overwrite methods from recording file. Can you let me know the best practices?
Thanks,
Nikolay
Thanks,
Nikolay
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: The app currently running on the device doesn't match
Hello,
That's right.
You would need to edit the <Recording>.UserCode.cs file for that purpose.
We recommend to add this action in your Recording module.
You could drag & drop your Repository Item from the repository into your action table (select 'Close Application > Close Window'.
Regards,
Markus (T)
That's right.
You would need to edit the <Recording>.UserCode.cs file for that purpose.
We recommend to add this action in your Recording module.
You could drag & drop your Repository Item from the repository into your action table (select 'Close Application > Close Window'.
Regards,
Markus (T)