Define Winrunner with combo box?

Define Winrunner with combo box?

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. We 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 we need to have recorded in our 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);

}

}



By:UMANG
Date:2001-02-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related TESTING Subjective Links

TESTING Subjective interview questions and answers for experienced and fresher