This is a migrated thread and some comments may be shown as answers.

'OnBeforeUnload' dialog handler doesn't work when running test tool on (minimized) Remote desktop

3 Answers 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Arnout
Top achievements
Rank 1
Arnout asked on 29 Mar 2013, 11:16 AM

Hello,

I’m currently using the Visual Studio plugin of the Telerik Web Test tool (version 2012.2.1204.0) to run tests on a user-based website that spawns a scripted ‘onbeforeunload’ dialog box when navigating to another URL. As this website doesn’t have designated logout functionality, navigating to another URL is the only way to logout.

Handling this dialog box can be done by the ‘OnBeforeUnload’ functionality included in the test tool. This generally works fine, but I ran into some problems when running my tests on a remote desktop when the remote desktop connection is minimized.

I’m not a through-and-through experienced c# user so correct me if I’m wrong, but what I think I’ve seen in the OnBeforeUnload method (ArtOfTest.WebAii.Dialogs.OnBeforeUnloadDialog.cs) in combination with my experience with this tool, is that when the active (parent) browser doesn’t have user focus this method tries to restore this focus, after which it tries to invoke or simulate some user actions like ‘press escape’ or ‘enter’ using the user keyboard (via the desktop.KeyBoard.KeyPress method) in order to handle the dialog box.

This doesn’t work too well with a remote desktop though. When the remote desktop connection utility is minimized the keypress method cannot acces any of the user's input devises, and so the dialogbox isn't handled (and remains stuck/not-handled), thus making running my tests impossible.

My question is this:

How do I handle the ‘on before unload’ dialog box under these conditions? Is there any way to do it without invoking an input device?

      • Something that (hopefully) makes it easier in this specific case to solve this issue is that I do not particularly care which option is selected in this dialog box, as long as it is either handled or forced to close.

Thanks in advance for your time and help.

Kind regards,

Arnout

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 29 Mar 2013, 11:31 AM
Hi Arnout,

In order to run tests on a remote machine using RDP while the window is minimized, you will need to add certain registry keys to the remote machine.

Please let us know if we can assist you further.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Arnout
Top achievements
Rank 1
answered on 29 Mar 2013, 12:03 PM
Thanks Plamen, this was indeed the cause of the problem. :-)

Kind regards,

Arnout
0
Plamen
Telerik team
answered on 29 Mar 2013, 12:13 PM
Hello Arnout,

Glad to hear it! Thanks for the update.

All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Arnout
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Arnout
Top achievements
Rank 1
Share this question
or