欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

20080405-Loadrunner-Baan Vuser Functions 博客分类: Mercury LoadrunnerWindows 

程序员文章站 2024-02-21 16:08:46
...
总觉得学习Loadrunner而不从这些基础函数开始就是一个缺陷,因此有时间允许就逐个翻译这些文档。

Button Object Functions
button_press: Activates a push button.
button_set: Sets the state of the specified radio or check button.

Edit Object Functions
edit_get_text: Returns the text in an edit object.
edit_set: Replaces the entire contents of an edit object.
edit_set_insert_pos: Places the cursor at the specified point.
edit_set_selection: Selects text in an edit object.
edit_type: Types a string in an edit object.

List Object Functions
list_activate_item: Activates items in a list.
list_collapse_item: Hides items in a list.
list_expand_item: Show hidden items in a list.
list_get_selected: Returns the currently selected item in a list.
list_select_item: Selects a list item.

Menu Object Functions
menu_select_item: Selects an item from a menu.

Object Functions
obj_get_info: Returns the value of an object attribute.
obj_get_text: Reads text from an object.
obj_mouse_click: Clicks within an object.
obj_mouse_dbl_click: Double-clicks with an object.
obj_mouse_drag: Drags the mouse within an object.
obj_type: Sends keyboard input to an object.
obj_wait_info: Waits for the value of an object attribute.

Scrool Object Functions
scroll_drag_from_min: Drags a scroll object to the specified distance from the minimum position.
scroll_line: Scrolls the specified number of lines.
scroll_page: Moves a scroll object the specified number of pages.

Tab and Toolbar Object Functions
tab_select_item: Select a tab in the active windows.
toolbar_button_press: Clicks a toolbar button.

Static Object Functions
static_get_text: Returns the contents of a static text object.

Synchronization Functions
obj_wait_info: Waits for the value of an object attribute
tbl_wait_selected_cell: Waits for the specified cell to appear in focus.
win_wait_infoWaits for the value of a window attribute.

Table Functions
tbl_activate_cell: Clicks Enter in the specified cell.
tbl_get_cell_data: Retrieves the contents of the specified cell from a table.
tbl_get_selected_cell: Returns the cell currently in focus in a table.
tbl_press_zoom_button: Clicks the table's zoom button.
tbl_set_cell_data: Sets the contents of a cell to the specified text in a table.
tbl_set_selected_cell: Selects a table cell.
tbl_set_selected_rows: Selects the specified rows in a table.

Window Object Functions
set_window:  Specifies the window that receives subsequent input. 
win_activate:  Activates a window. 
win_close:  Closes a window. 
win_get_info:  Reads text from a window. 
win_get_info:  Returns the value of a window attribute. 
win_max:  Maximizes a window to fill the entire screen. 
win_min:  Minimizes a window to an icon. 
win_mouse_click:  Clicks within a window. 
win_mouse_dbl_click:  Double-clicks within a window. 
win_mouse_drag:  Drags the mouse within a window. 
win_move:  Moves a window to a new absolute location. 
win_resize:  Resizes a window. 
win_restore:  Restores a window from an iconized or maximized state to its previous size. 
win_type:  Send keyboard input to a window.

Session Functions
close_session:  Closes all Baan sessions and windows.
start_session:  Begins a specific Baan session.
init_session:  Initializes a Baan session.
set_default_timeout:  Sets the default timeout.
set_exception:  Specifies how to handle exceptions.
set_think_time:  Sets the think time range

Return Values
E_OK  0  Operation successful. 
E_GENERAL_ERROR  -10001  General error occurred. 
E_ILLEGAL_OPERATION  -10004  Operation invalid for object. 
E_OUT_OF_RANGE  -10005  Object is out of range. 
E_NOT_DISPLAYED  -10101  Window or object is not displayed. 
E_DISABLED  -10102  Window or object is disabled. 
E_IMPROPER_CLASS  -10103  Object class cannot perform this operation. 
E_ILLEGAL_KEY  -10104  Key or mouse button name is illegal. 
E_ITEM_NOT_FOUND  -10105  未找到符合的Item。 
E_NOT_RESPONDING  -10106  AUT is alive but does not respond. 
E_OBJECT_SYNTAX  -10107  Illegal syntax used. 
E_DUPLICATE_OBJECT  -10108  对象不唯一 
E_DUPLICATE_DESC  -10109  内容不唯一
E_DUPLICATE_WINDOW  -10110  窗口不唯一 
E_DUPLICATE_WIN_DESC  -10111  Window description is not unique. 
E_ILLEGAL_NUM_OF_PARAMS  -10112  Number of parameters does not match those for the command. 
E_NOTICE_NOT_FOUND  -10113  Notice window not found. 
E_AUT_DISCONNECTED  -10114  AUT is not connected to the system. 
E_ATTR_NOT_SUPPORTED  -10115  函数不支持该属性
E_MISMATCH  -10116  Verification mismatch found. 
E_ITEM_NOT_UNIQUE  -10117  More than one item in list or menu has this name. 
E_TEXT_TOO_LONG  -10118  Text to be inserted exceeds maximum number of characters. The string will be truncated to the appropriate length. 
E_DIFF  -10119  未比较GUI验证点 
E_CMP_FAILED  -10120  比较失败 
E_CAPT_FAILED  -10121  抓取失败 
E_WRONG_OBJ_CHKLIST  -10122  Object in checklist is not the object in the command. 
E_SET_WIN  -10123  Window setting parameters missing. 
E_BITMAP_TIMEOUT  -10124  wait_bitmap exceeded specified wait time. 
E_BAD_CHECK_NAME  -10125  Syntax error in requested check. 
E_OBJ_CAPT_FAILED  -10126  Capture failed for specified object. 
E_UNEXP_WIN  -10127  Window in checklist is not the window in the command. 
E_CAPT_FUNC_NOT_FOUND  -10128  Capture function not defined. 
E_CMP_FUNC_NOT_FOUND  -10129  比较函数未定义 
E_TSL_ERR  -10130  语法错误 
E_TOOLKIT_MISMATCH  -10131  Incorrect toolkit detected. 
E_RECT_COVERED  -10132  Desired rectangle is hidden. 
E_RECT_OUT  -10133  Desired rectangle does not appear on screen. 
E_AREA_COVERED  -10134  Desired area is hidden. 
E_AREA_OUT  -10135  Desired area does not appear on screen. 
E_STR_NOT_FOUND  -10136  Text string not located. 
E_WAIT_INFO_TIMEOUT  -10137  wait_info exceeded specified wait time. 
E_SYNC_FAIL  -10138  同步失败
E_DIFF_SIZE  -10139  Expected and actual bitmaps are different sizes. 
E_CANT_DRAG  -10140  当前对象不支持拖动 
E_DROP_WITHOUT_DRAG  -10141  没有下拉选项 
E_VIR_OBJ  -10142  函数不支持虚拟对象 
E_MISSING_ATTR  -10143  Virtual object not found because obligatory attribute is missing. 
E_EDIT_SET_FAILED  -10144  未找可编辑的对象
相关标签: Loadrunner Windows