I have a problem with running test in Windows Scheduler.
After running the test I get an error:
Unexpected exception occured: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
at Ranorex.Core.ElementEngine.CheckLicense(Boolean showDialogs)
at Ranorex.Core.ElementEngine.AssertLicense()
at Ranorex.Core.ElementEngine..ctor()
at Ranorex.Core.ElementEngine.get_Instance()
at Ranorex.Host.get_Local()
at line :
Host.Local.OpenBrowser("https://onet.pl/", "IE", "", false, false);
If I doubleclick the *.exe it runs fine, with no errors
My system is Windows Widows Server 2008 Standard
Test failed after start in Windows Scheduler
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Test failed after start in Windows Scheduler
Hi,
This is not really a Ranorex specific error, the message just stated that "Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation", so why do you want to show a modal dialog?
You can try to comment the code out which creates the dialog, because then your code should properly run.
Regards,
Markus
Ranorex Support Team
This is not really a Ranorex specific error, the message just stated that "Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation", so why do you want to show a modal dialog?
You can try to comment the code out which creates the dialog, because then your code should properly run.
Regards,
Markus
Ranorex Support Team
Re: Test failed after start in Windows Scheduler
Hi
As i wrote above, error appears when Ranorex open a Browser (IE)
I'm not showing a modal dialog.
Error appear at marked (red) line.
Report.Log(ReportLevel.Info, "Website", "Opening web site 'https://onet.pl/' with browser 'IE' in normal mode.", new RecordItemIndex(2));
Host.Local.OpenBrowser("http://onet.pl/", "IE", "", false, false);
Delay.Milliseconds(0);
As i wrote above, error appears when Ranorex open a Browser (IE)
I'm not showing a modal dialog.
Error appear at marked (red) line.
Report.Log(ReportLevel.Info, "Website", "Opening web site 'https://onet.pl/' with browser 'IE' in normal mode.", new RecordItemIndex(2));
Host.Local.OpenBrowser("http://onet.pl/", "IE", "", false, false);
Delay.Milliseconds(0);
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Test failed after start in Windows Scheduler
Hi,
Sorry for my wrong suggestion, could it be that you are using the trial version of Ranorex Studio?
I also tested it on my local machine and it worked without any errors, I think its because of the "Evaluation Dialog".
Regards,
Markus
Ranorex Support Team
Sorry for my wrong suggestion, could it be that you are using the trial version of Ranorex Studio?
I also tested it on my local machine and it worked without any errors, I think its because of the "Evaluation Dialog".
Regards,
Markus
Ranorex Support Team
Re: Test failed after start in Windows Scheduler
Hi
I'm using Ranorex 3.2 Premium Node-Locked, but installed version is 3.3.
I'm also tested a replacement for Windows Scheduler - System Scheduler - and test ran correct.
I'm using Ranorex 3.2 Premium Node-Locked, but installed version is 3.3.
I'm also tested a replacement for Windows Scheduler - System Scheduler - and test ran correct.
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: Test failed after start in Windows Scheduler
Hi,
I was on the wrong track, sorry.
Did you start it from the current session of the logged on user, because otherwise it will not work.
Did you select this specific option? Regards,
Markus
Ranorex Support Team
I was on the wrong track, sorry.
Did you start it from the current session of the logged on user, because otherwise it will not work.
Did you select this specific option? Regards,
Markus
Ranorex Support Team
You do not have the required permissions to view the files attached to this post.
Re: Test failed after start in Windows Scheduler
Hi
Now it's ok, thx for help
Now it's ok, thx for help
Re: Test failed after start in Windows Scheduler
Hello,
So what was your solution?
I have also Problems with showing messageboxes or other modal Dialoges.
My company had just bought Ranorex .
We didn't started yet with Ranorex, but we realy want to!
The manuel execution runs without any Problems, but when i start tests (not Ranorex. NUnit-Test!) as a Win Service, i get this stupid Error(Userinteractive Mode Stuff...) ...
Any Ideas?
I'am concerning about the same stuff with Ranorex on our Buildserver.
What is, in your point of view, the most elegant way to start Ranorextest automaticly ?
Is there any chance to avoid this Error? Maybe some calling parameters in the calling Script?
Best regards,
Said
So what was your solution?
I have also Problems with showing messageboxes or other modal Dialoges.
My company had just bought Ranorex .
We didn't started yet with Ranorex, but we realy want to!
The manuel execution runs without any Problems, but when i start tests (not Ranorex. NUnit-Test!) as a Win Service, i get this stupid Error(Userinteractive Mode Stuff...) ...
Any Ideas?
I'am concerning about the same stuff with Ranorex on our Buildserver.
What is, in your point of view, the most elegant way to start Ranorextest automaticly ?
Is there any chance to avoid this Error? Maybe some calling parameters in the calling Script?
Best regards,
Said
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Test failed after start in Windows Scheduler
Hi,
The problem is, that your automation code is running on a process that is not running as the currently logged on user. Therefore the process is not be able to interact with the desktop in any way. So, as Markus mentioned, make sure to start it from the current session of the logged on use.SaiD wrote:The manuel execution runs without any Problems, but when i start tests (not Ranorex. NUnit-Test!) as a Win Service, i get this stupid Error(Userinteractive Mode Stuff...) ...
Any Ideas?
You might have a look at our CI integration blog posts which cover our recommended way of automatically build and execute automated tests.SaiD wrote:I'am concerning about the same stuff with Ranorex on our Buildserver.
What is, in your point of view, the most elegant way to start Ranorextest automaticly ?
- Integrate Ranorex into Any Continuous Integration Process
- Bamboo CI with Ranorex Test Automation
- Integrating Ranorex Automation in TeamCity CI Process
- Integrating Ranorex Automation in Jenkins CI Process
- Running Ranorex Automated Tests with HP Quality Center
- Running Ranorex Automated Tests with Microsoft Test Manager