WinRunner Common Mistakes

Error "The file "..gui" cannot be loaded. The window .. already exists in the GUI map", or ".. Object already exists".
*.gui file contains the same window or object name which have temporary (L0) or other already opened .gui file. Close other files or clear temporary .gui file. Due to this reason we use only one .gui file for all project, for really big application it is only ~ 200k, which for today is fairly small amount. Note that .gui file can have different window/object names with the same description. You will get warning only when you are adding this description. It is useful for separating large window content in smaller logical chunks.

Error "..Object is not in the GUI map" or Run Wizard — Cannot Find dialog window appears.
If logical object name is used, probably set_window("window_name"); or web_sync(10); statement is forgotten. If full object description is used (e.g. edit_set("{class: edit, MSW_class: html_edit, html_name: "name"}",value);), then probably object description is not unique. Add object index or location in description, e.g. ..{class: edit, MSW_class: html_edit, html_name: "name", location: 0}"..

Error ..Test not found in the search path..
Either test name is incorrect or WR can't find it in specified path. Specify paths in Tools- General Options- Folders (WR 7.6). You can add . for current folder and ../. for parent folder also, or ../Another_folder for another directory beside.

Error Statement is not legal in context of compiled module
Compiled Module script (File-Test Properties-Test Type) contains wrong statement (usually function execution outside function body.) Compiled module can contain free constant/variable declarations (e.g. public a="a"; const B="B";) or function definitions (e.g. function f () {return 0;}). All other statements should be inside function body. (e.g. function f () {tl_step("step",0,"msg");}).

Error Cannot reload compiled module.. Function .. is currently in the call chain
You are trying to reload function script (compiled module) from its contained function, or you have opened functional script using custom function which tries to reload function (compiled module) script. Our workaround is if (batch_mode!=ON) reload("ABC_Functions",0,1);, because functional scripts are invoked from custom functions only from batch script and then batch_mode==ON.

Warning: Undefined function called: date..
You invoked some of WR date functions (e.g. date_string_to_Julian()), which by default are not enabled. Select Tools-general Options...- General- Enable date operations on and restart WinRunner.

Warning ..too many arguments.
You passed too many arguments to script or function. For invoked function press Ctrl_L+F8 (debug step into) from function invocation line (e.g. a=my_sum(1,2,3);) and count number of arguments in function declaration line (e.g. function my_sum(in param1, in param2)). For invoked script check passed parameters for call or call_close line (e.g. call_close "InvokedScript" ("param1","param2","param3");) and select File-Test properties-Parameters for InvokedScript and count actual parameters there (this info is stored in header file). Use generate_sript_list.vbs (3.2K, FTP) or generate_function_list.vbs (1.7K, FTP) to prepare lists of scripts and functions.

Variable has extra number or character for assigned value
Then probably you have forgot semicolon in assignment line, e.g.
a="A" b="B"; printf a;
will print AB.

"Cannot create ... dialog while running in silent mode"
This error appears when create_input/list/browse_file/password_dialog() function is invoked, but WR runs in batch mode (Tools-General Options...-Run-Run in batch mode).

"No text was found" when trying to get the text from the screen or window
Note that text can be simply get from object or window property using edit_get..(), obj_get..(), win_get_info..() methods. From windows (actually screen) text can be recognized using OCR (optical character recognition) using e.g. win_get_text() or get_text() methods: Sample code is stored in script_get_text (1.3K, FTP).

Created by Valdis Vītoliņš on 2008-11-23 11:58
Last modified by Administrator on 2016-04-01 12:19
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License