Wednesday, March 19, 2008

Win Runner Q & A Part 14

Win Runner Q & A Part 14

131. Why you use reload function?

a) If you make changes in a module, you should reload it. The reload function removes a loaded module from memory and reloads it (combining the functions of unload and load).

The syntax of the reload function is:

reload ( module_name [ ,1|0 ] [ ,1|0 ] );


The module_name is the name of an existing compiled module.

Two additional optional parameters indicate the type of module. The first parameter indicates whether the module is a system module or a user module: 1 indicates a system module; 0 indicates a user module.

(Default = 0)

The second optional parameter indicates whether a user module will remain open in the WinRunner window or will close automatically after it is loaded. 1 indicates that the module will close automatically. 0 indicates that the module will remain open.

(Default = 0)

132. Why does the minus sign not appear when using obj_type(), win_type(), type()?

If using any of the type() functions, minus signs actually means hold down the button for the previous character. The solution is to put a backslash character "\\" before the minus sign. This also applies to + < >.

133. Write and explain compile module?

134. How do you call a function from external libraries (dll).

135. What is the purpose of load_dll?

136. How do you load and unload external libraries?

137. How do you declare external functions in TSL?

138. How do you call windows APIs, explain with an example?

139. Write TSL functions for the following interactive modes:

i. Creating a dialog box with any message you specify, and an edit field.

ii. Create dialog box with list of items and message.

iii. Create dialog box with edit field, check box, and execute button, and a cancel button.

iv. Creating a browse dialog box from which user selects a file.

v. Create a dialog box with two edit fields, one for login and another for password input.

140. What is the purpose of step, step into, step out, step to cursor commands for debugging your script?

No comments: