Automated Testing Service Group
Automated Testing Service Group offers a complete range of testing automation services:
- testing scenarios development
- automation tools selection
- testing scripts development
- regression and functional testing
- employee training
Our main objective is to improve software quality.
Intelligent approach to automation enables us to considerably reduce the time required for testing as well as for testing scripts development.
Latest in blog
PushButton is one of the simplest controls, but there could be problems even with it. In this blog post we will show several ways of how to perform a non-standard Click() action when standard Click can not be used.
GUI level automated testing has a lot of surprizes related to interaction with window objects. The main problem is that each automation tool has its own set of the most effective solutions to the problem of window definitions maintainability. But these are the most effective solutions for each particular case ( not in general ). Nevertheless, there are some mechanisms which are common to a wide range of tools. Or at least there are analogs. For example there is such approach as windows definitions mapping which provides the ability to set some alias into correspondence to actual window definition. Such solution implementation in TestComplete has one key disadvantage: in case of windows hierarchy modifications for some particular object there is necessity to re-map all child objects. The alternative to mapping was introduced in TestComplete version 6. There was an Alias functionality providing the ability to construct mapped objects hierarchy. But this solution has another disadvantage: slow performance. So, we need some mechanisms allowing to minimize time costs for window definitions modification in case of UI changes. Let's examine this problem on some particular case.
The simplest and most obvious way to close a window by SilkTest is using Close() method. However, sometimes this method doesn't work. For example, try to open Notepad, write some text there and then execute the following code
[ ] Notepad.SetActive ()
[ ] Notepad.Close ()
Notepad will show a message box about changes made and will wait for user's actions, and SilkTest will post an error message to the log
*** Error: Window cannot be closed
Of course, such situations should be foreseen and processed in scripts, but what if we need to close a window anyway? In this case we can use Kill() method which simply kills a window. For some reason this method is not described in SilkTest help, but it can be found in the winclass.inc file.
[ ] Notepad.SetActive ()
[ ] Notepad.Kill ()
A new 2009 year knoks the door and the team of Automated Testing Service Group wishes everyone Happy New Year! Let next year bring more possibilities and achievements! Let the success follow you everytime.
Sometimes code recorded by TestComplete does not replay as it is expected. One of the problem methods is Drag() method, which allows to move objects to other positions. In this case we can use methods MouseDown() and MouseUp() of Sys.Desktop object to create own dragging function.
function DragDrop(obj, deltaX, deltaY)
{
var iX = obj.ScreenLeft + obj.Width/2;
var iY = obj.ScreenTop + obj.Height/2;
Log.Picture(obj.Picture(), "Object to be moved");
obj = Sys.Desktop.ObjectFromPoint(iX + deltaX, iY + deltaY);
Sys.Desktop.MouseDown(VK_LBUTTON, iX, iY);
obj.HoverMouse(obj.Width/2, obj.Height/2);
Sys.Desktop.MouseUp(VK_LBUTTON, iX + deltaX, iY + deltaY);
}
This function presses left mouse button in the center of the object to be moved, then moves mouse cursor to the new destination and releases pressed button. Here is an example demonstrating moving of icons in the QuickLaunch toolbar.
function Test3()
{
var w1 = Sys.Process("Explorer").Window("Shell_TrayWnd").Window("ToolbarWindow32", "Quick Launch");
DragDrop(w1, -30, -20);
}
