Interview Questions

Object name Changing dynamically?

Mercury WinRunner FAQ


(Continued from previous question...)

Object name Changing dynamically?

1.
logicalname:"chkESActivity"
 {
  class: check_button,
  MSW_class: html_check_button,
  html_name: chkESActivity,
  part_value: 90
 }   
2.
logical name "chkESActivity_1"
 
{
  class: check_button,
  MSW_class: html_check_button,
  html_name: chkESActivity,
  part_value: 91
}


Replace with:

 # you give any name as the logical name
Logical:"CheckBox"   
{
 class: check_button,
 MSW_class: html_check_button,
 html_name: chkESActivity,
 part_value: "![0-9][0-9]" 	
}
# changes were done here
you can use any of the checkbox command like
button_set("CheckBox",ON); 	
# the above statement will check any check 
box with part value ranging from 00 to 99

(Continued on next question...)

Other Interview Questions