WinRunner custom dialogs: parameterize your scripts at run-time
How to input parameters for WinRunner scripts
Description
In order to use a customizable dialog, you need to declare data fields and data handler that will populate them as per your needs/rules.
# create_custom_dialog specific fields static _env_str, _case_str, _input_str; # public function _on_param_dlg(in env_str, in case_str, in input_str) { _env_str = env_str; _case_str = case_str; _input_str = input_str; }
Then use WinRunner function create_custom_dialog to display a modal dialog window.
Note. Clean-up data fields first to remove values left from previous calls.
public function _param_dlg(inout env_id, inout case_id, inout input_id) { _env_str = ""; _case_str = ""; _input_str = ""; create_custom_dialog ("_on_param_dlg", "Please type the pass-in parameters..", "Start", "Environment:, Test_Case:, Input_File:", ""); env_id = _env_str; case_id = _case_str; input_id = _input_str; }