Have you thought of including interactions with desktop applications in your tests?
In the “wide” web space you might find many tough ways to use a desktop application in a web test. The main aim of this post is to show you a very simple and fast way to achieve such an interaction.
Speaking from my own experience, I had to create a test that copies the content of a MS Word document in a web control and verify that the pasted content is correct. Since I started my career as a Quality assurance engineer, I had made only web automated tests and making a web test that opens MS Word was a challenge for me.
The most common problems you would face when creating interaction between your web test and a certain desktop application are: how you could open the desktop application, how you could get its content and so on.
The first thing you have to decide is what tool you will use in order to test a desktop application together with a web page.
After some research I tried Sikuli. Sikuli is a tool used to automate and test graphical user interfaces using screenshot images. The tough part in using Sikuli was testing a web page because there was not an easy way to navigate to a page via the screenshot images, so that you can test the behavior of a web control and so on.
Both Sikuli and Telerik Testing Framework are free and here I will tell you why I chose the Telerik Testing Framework:
Telerik Testing Framework gives you the opportunity to not only automate Browser Actions (DOM & UI) but to integrate your test with desktop applications too. You can set references to any namespace you would like to use in your test and extend the diversity of scenarios that a test may cover.
I will present you an example of how you can make an automated test that pastes content from Word into a web module. Let’s now see how you can write a test in just four steps!
In order to open the Word document I use the Process class of the System.Diagnostics namespace that gives you access to start or stop the local system processes on your machine. You just need the path to the document that you’d like to open and the name of its executable file:
Process process = Process.Start(
I found at least two ways to use keyboard interactions in your test:
Desktop.KeyBoard.KeyPress(Keys.Enter, 1000, 1);
), 150, 1);
If you want, you can use System.Windows.Forms.Clipboard to paste some content:
I will show you an example with our RadEditor control from Telerik UI for ASP.NET AJAX:
RadEditor editor = Find.ById<RadEditor>(
Browser contentIframe = ActiveBrowser.Frames.ById(
//here in the quotes you should set the expected content
The following video shows how the execution of this kind of test goes if you are looking at the screen of the machine that runs it:
Other scenarios that might be covered using this approach:
Of course, this is not all. Share your experience and what you build with your fellow QAs in the comments below!
Joana Ivanova has been working as a QA engineer at Telerik's ASP.NET AJAX division since 2012. She is responsible for verifying the quality of Telerik UI for ASP.NET AJAX and developing the automated test infrastructure. In her spare time, Joana is interested in billiards, cars, cooking, loves sightseeing and going out with her friends.
Copyright © 2016, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.