Mercury WinRunner FAQ
Part:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Winrunner with combo box
Problem:
Application has combo box which has some values need to select
item 4 in first combo box to run the test Scenario.
How to get the value of the selected combo box?
Answer1:
Use the GUI spy and compare the values in the SPY with the values in the GUI map
for the physical attributes of the TComboBox_* objects. It appears to me that
WinRunner is recording an attribute to differentiate combobox_1 from _0 that is
*dynamic* rather than static. You need to find a physical property of all the
comboboxes that is constant and unique for each combobox between refreshes of
the app. (handle is an example of a BAD one). That's the property you need to
have recorded in your GUI map (in addition to those physical properties that
were recorded for the first combobox that was recorded.
Answer2:
Go through the following script, it will help .....
function app_data(dof)
{
report_msg ("application data entry");
set_window ("Flight Reservation", 6);
list_get_items_count ("Fly From:" , flyfromc);
list_get_items_count ("Fly To:" , flytoc);
report_msg (flyfromc);
report_msg (flytoc);
for (i =0; i < flyfromc; i++)
{
#for (j=0; j<flytoc-1; j++)
for (j=0; j<flytoc-1; j++)
{
m=0;
do
{
menu_select_item("File;New Order");
edit_set ("Date of Flight:", dof);
obj_type ("Date of Flight:","<kTab>");
list_select_item ("Fly From:","#"i);
# Item Number 0;
obj_type ("Fly From:","<kTab>");
list_select_item ("Fly To:", "#"j);
# Item Number 0;
obj_mouse_click ("FLIGHT", 42, 20,LEFT);
set_window ("Flights Table", 1);
list_get_items_count ("Flight" ,flightc);
list_activate_item ("Flight", "#"m);
# Item Number 1;
set_window ("Flight Reservation",5);
edit_set ("Name:", "ajay");
button_press ("Insert Order");
m++;
}while ( a<flightc);
report_msg (j);
}
report_msg (i);
}
}
WinRunner: How to Set GUI file's searchpath?
[GUI file at d:\1\2\3\4\windows.gui
How to use the script bellow to load the GUI file successfully.?
#load gui file
GUI_unload_all;
if(GUI_load("windows.gui")!=0)
{
pause("can not open \"windows.gui\" File");
texit;
}
#end loading gui
Put all the scripts at localmachine but GUI files at TD
Server ,Used command line to run my scripts(successfully).
When update Winrunner 7.6 Version to 8.2 and connect to TD
Server,now it seems that wrun.exe couldn't find localmachine's
scripts, anyone knows wrun.exe command-line mode's new parameters(in WINRUNNER 8.2 Ver.)?
Answer1:
GUI_load("C:\\Program Files\\Mercury
Interactive\\WinRunner\\EMR\\EMR.gui");
in your winrunner startup file, you can set the path
for this startup file in general options->startup
#load gui file
GUI_unload_all;
if(GUI_load("C:\\Program Files\\Mercury
Interactive\\WinRunner\\EMR\\EMR.gui")!=0)
{
pause("unable to open C:\\Program
Files\\Mercury
Interactive\\WinRunner\\EMR\\EMR.gui");
texit;
}
#end loading gui
you cant set path for GUI map file in winruner other
than Temporary GUI Map File
Answer2:
Might suggest to your boss that the GUI is universal to all machines in
spite of the fact that all machines must have their own local script in his
view. Even if you are testing different versions of the same software, you
can have the local machine "aware" of what software version it is running
and know what GUI to load from you server. I run a lab with 30 test
machines, each with their own copy of the script(s) from the server, but
using one master GUI per software roll.
As far as how to set search path for the local machine, you can force that
in the setup of each machine. Go to Tools=>Options=>General
Options=> Folders. Once there, you can add, delete or move folders around at
will. WinRunner will search in the order in which they are listed, from top
down. "Dot" means search in the current directory, whatever that may be at
the time.
Q: WinRunner: How to check the tab order?
winrunner sample application
set_window ("Flight Reservation", 7);
if(E_OK==obj_type ("Date of Flight:","<kTab>")){
if(E_OK==obj_type ("Fly From:","<kTab>")){
if(E_OK==obj_type ("Fly To:","<kTab>")){
if(E_OK==obj_type ("Name:","<kTab>")){
if(E_OK==obj_type ("Date ofFlight:","<kTab>"))
{
report_msg("Ok");
}
}
}
}
Q:WinRunner: Why "Bitmap Check point" is not working with Framework?
Bitmap chekpoint is dependent on the monitor resolution. It depends on the
machine on which it has been recorded. Unless you are using a machine with a
screen of the same resolution and settings , it will fail. Run it in update mode
on your machine once. It will get updated to your system and then onwards will
pass.
Q: How to Plan automation testing to to impliment
keyword driven methodology in testing automation using winrunner8.2?
Keyword-driven testing refers to an application-independent automation
framework. This framework requires the development of data tables and keywords,
independent of the test automation tool used to execute them and the test script
code that "drives" the application-under-test and the data. Keyword-driven tests
look very similar to manual test cases. In a keyword-driven test, the
functionality of the application-under-test is documented in a table as well as
in step-by-step instructions for each test.
Suppose you want to test a simple application like Calculator and want to
perform 1+3=4, then you require to design a framework as follows:
Window->Calculator ; Control->Pushbutton ; Action-> Push; Argument->1
Window->Calculator ; Control->Pushbutton ; Action-> Push; Argument->+
Window->Calculator ; Control->Pushbutton ; Action-> Push; Argument->3
Window->Calculator ; Control->Pushbutton ; Action-> Push; Argument->=
Window->Calculator ; Action-> Verify; Argument->4
Steps are associated with the manual test case execution. Now write functions
for all these common framework required for your test caese. Your representation
may be different as per your requirement and used tool.
Part:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|