loadrunner 函数说明(转载)
上一篇 / 下一篇 2009-08-06 17:46:07 / 个人分类:LR资料
// button_press函数激活指定的推按钮。51Testing软件测试网ZH^1e:d$bJR!@
int button_press ( LPCSTR button );
;Z0q;i'@I f4zf$d132979// button_set 函数将按钮状态设置为 ON 或 OFF。51Testing软件测试网3nx?ux:[%fvp
int button_set ( LPCSTR button, int state );51Testing软件测试网Ma"Oj1mz!w
// close_session 函数关闭所有打开的窗口并结束
R`3I2f#k132979// 当前的 Baan 会话。在 Baan 模板中创建的此函数
%D^6Uf"h132979// 出现在脚本的 vuser_end 部分中。
qM7z$fJ^/p7u(ph7`w132979int close_session();
bB r'fnm132979// edit_get_text 函数返回在指定 edit 对象中
%U$A9pI|4TEN132979// 找到的所有文本。若要从特定块中读取文本,
.k$a*q1H1|/S132979// 请使用 edit_get_block。
ZU
b9ZZ132979int edit_get_text ( LPCSTR edit, char *out_string );51Testing软件测试网)I5jw9v-|-EdQzK
// edit_set 函数使用指定的字符串设置 edit 对象的
cd@5ZqK8qB132979// 内容。该字符串将替换任何现有字符串。51Testing软件测试网FH z0q y
int edit_set ( LPCSTR edit, LPCSTR text );
~*Q9DUl8{T132979// edit_set_insert_pos 函数将光标放置51Testing软件测试网[.{Br]KzI-h5N
// 在 edit 对象内的指定位置。
b]r
L"q,hB%~132979int edit_set_insert_pos (LPCSTR edit, int row, int column );51Testing软件测试网;o8f?(QxXS3J
:b;S0t(x7u132979// edit_set_selection 函数突出显示指定文本。
O5x@^'|f132979int edit_set_selection ( LPCSTR edit, int start_row, int start_column, int end_row, int end_column );51Testing软件测试网vw.E.RFqNj%D
// edit_type 函数将文本字符串输入到 edit
Z`/I RAAW/t
[z132979// 对象中。该文本字符串不会替换现有字符串;
6NaeiC132979// 它替换的是位于当前光标位置的指定文本。
1RU#xnk#{4hdl132979int edit_type ( LPCSTR edit, LPCSTR text );
// init_session 函数通过指定登录数据和配置51Testing软件测试网Q:R3_0I+^4awk*g
// 信息打开 Baan 连接。此函数向 Baan 服务器51Testing软件测试网3x
Z0l
Z*S ~%\'S
// 呈现包含在 Baan Configuration 部分中51Testing软件测试网#|1PB7a1cD2O$f+q
// 的信息。
o(@`o.zQb-d9K"vC+?132979int init_session ( char * host, char * user, char *password, char *BSE, char *Bshell_name, char * settings );51Testing软件测试网;^%Wv4^n2i2e0Bx
// list_activate_item 函数双击列表中的项目。
aG"|?
LB8M132979// 项目可由其逻辑名称指定。51Testing软件测试网b q]bm
iT
int list_activate_item ( LPCSTR list, LPCSTR item );51Testing软件测试网S|S
T)m$q%M!^*`G
J@ NM}k)t132979// list_collapse_item 函数隐藏展开的 TreeView
&sWuin5R132979// 列表中的子项,例如文件夹中的各个文件。51Testing软件测试网P*n~8YJ4_
int list_collapse_item (LPCSTR list, LPCSTR item );51Testing软件测试网9h0I-EE!lr5LfU6d D
%CC6I8Or"]132979// list_expand_item 函数显示展开的
yX$LE)tOk Z^132979// TreeView 列表中所隐藏的子项,例如51Testing软件测试网n\3@,oG+X"Q
// 文件夹中的各个文件。
/~e6Fv
U8nN132979int list_expand_item (LPCSTR list, LPCSTR item );
// list_get_selected 函数返回列表中的选定51Testing软件测试网]{
y2|1ghth5z
// 项目。它既查找标准列表,也查找多选项列表。51Testing软件测试网E;zS['s9n:K
int list_get_selected (LPCSTR list, LPCSTR out_item, LPCSTR out_num );
l(N%W%TT[/H3U132979// list_select_item 函数从列表中选择项目51Testing软件测试网g\
y:K1J%L6MB M
// (在项目上执行一次鼠标单击)。项目可由51Testing软件测试网Ca9m,x!n8|A c
// 其名称或数字索引指定。索引被指定为一个
Zs@v"@D8NFy!DR132979// 字符串,并前置有字符 #。列表中的第一个
*cV*h#gS"pg th+Y132979// 项目编号为 0。例如,列表中的第三个项目
vmY+TS3Fm132979// 将表示为 "#2"。51Testing软件测试网4QP `bH-BCP
int list_select_item ( LPCSTR list, LPCSTR item );51Testing软件测试网A1`S{-U\Uh
jM.X\9Ya#J{132979// menu_select_item 函数根据菜单51Testing软件测试网5B#l7D'lB'C
[
// 的逻辑名称和项目名称从菜单中选择
&{v6M#Y0~[132979// 项目。注意,菜单和项目表示为单个
cS+}dKG'I}PT\132979// 字符串,并使用分号分隔。
HO#Wp)xrh Wr132979int menu_select_item ( LPCSTR menu_item );51Testing软件测试网e;i?9A,F v@0?w:X
o+d4D'I0eAC_132979// obj_get_info 函数检索指定属性的值,51Testing软件测试网h[7ne \a+e
// 并将其存储在 out_value 中。51Testing软件测试网
@PX9hofN5|C
int obj_get_info ( LPCSTR object, LPCSTR property, char *out_value );
// obj_get_text 函数从指定的对象51Testing软件测试网 H,x7Mn*z~&STT.b |
// 或对象区域中读取文本。51Testing软件测试网}2j~R8Ec8d"z9p
int obj_get_text (LPCSTR object, LPCSTR out_text );51Testing软件测试网K,c ypO4@Y:e
f`s M d7|(j-ec132979// obj_mouse_click 函数在对象内的51Testing软件测试网?;LR&lW{N
// 指定坐标处单击鼠标。51Testing软件测试网B'N\Hn
I,\x
int obj_mouse_click ( LPCSTR object, int x, int y, [mouse_button] );
// obj_mouse_dbl_click 函数在对象内的
gN}G%fV132979// 指定坐标处双击鼠标。
0x Jgk7r132979int obj_mouse_dbl_click ( LPCSTR object, int x, int y, [mouse_button] );51Testing软件测试网r |R|4@
&Ff4f0TB9\132979// obj_mouse_drag 函数在 GUI
B3h3m7W U5H;On3b132979// 对象中执行鼠标拖动操作。指定的
H)hyX5n6L132979// 坐标是相对于 GUI 对象(而非51Testing软件测试网:x,iojY0K9\)i
// 屏幕)的左上角。
D#tH_@L#iq4~[132979int obj_mouse_drag (LPCSTR object, int start_x, int start_y, int end_x, int end_y, [ ButtonT mouse_button] );
9L K&T1`8rj3q
IL132979// obj_type 函数指定将 keyboard_input51Testing软件测试网Oi*q/DF#zZ.X0H
// 发送到的目标对象。
!x8|*g\6[U132979int obj_type ( LPCSTR object, unsigned char keyboard_input, [unsigned char modifier ] );51Testing软件测试网q*Z$KGJu(n6Z
D]9p)DX/S|132979// obj_wait_info 函数等待对象51Testing软件测试网1C
A~-k1v'U'Cp
// 属性达到指定值,然后继续51Testing软件测试网JgvG x-NT
//测试运行。如果未达到指定
-faXh"J"i132979// 值,则函数将一直等到时间51Testing软件测试网 K&q_FnIsZd
// 到期,然后再继续测试。
B;]6}:vY)s~p'M132979int obj_wait_info (LPCSTR object, LPCSTR property, LPCSTR value, UINT time );
// scroll_drag_from_min 函数将滚动屏
gJ-Aw^
B(QA132979// 移动到与最小位置相距指定距离的位置。
'@x~#t7a%ks3?h132979int scroll_drag_from_min ( LPCSTR object, [int orientation], int position );
;o{,K*C]'l132979// scroll_line 函数滚动指定行数。
WfV:A!g7~132979// 此函数可用于滚动栏和滑块对象。51Testing软件测试网[G7]6[:k+h5DJ&^y^
int scroll_line ( LPCSTR scroll, [ScrollT orientation], int lines );
// scroll_page 函数将滚动屏移动指定页数。51Testing软件测试网}/sC&I B#UH
\lPR
int scroll_page ( LPCSTR scroll, [ScrollT orientation], int pages );
// set_default_timeout 函数设置回放51Testing软件测试网-c;TM vi9^4anA
// 期间 Baan Vuser 函数的超时期间段。
ut&A#B.n&Uy132979// 例如,当脚本执行 set_window 函数
2tPp1Jx%_d K'A&_132979// 时,如果窗口在指定超时时间段内没有
,z/e'W"WX1|B132979// 出现,则会生成错误。
5u^4O.U"D"X&bD*n_2k+?132979void set_default_timeout ( long time );
// set_exception 函数指定在发生异常时51Testing软件测试网%y3n*v%Tz
l1h
// 应执行的操作。应指定要调用以处理异常
db!l+]HD*ps132979// 窗口的函数。
R5ny"T
r
E132979void set_exception ( LPCSTR title, long function );
// set_think_time 函数指定脚本执行
C(}$GAT1T132979// 期间要使用的思考时间范围。运行脚本
6DV)MJY132979// 时,LoadRunner使用指定范围内的51Testing软件测试网2x9XVVF7~(p
// 随机思考时间,并在每个操作完成后51Testing软件测试网C-C0P!TJG+b
// 暂停该思考时间长度。51Testing软件测试网g^.NF7j3a4]0T,GeM
void set_think_time ( USHORT start_range, USHORT end_range );51Testing软件测试网2zp:@}M H
// set_window 函数将输入定向到51Testing软件测试网+[.|b7tQBT1[\C
// 当前应用程序窗口并在 GUI 图中51Testing软件测试网6x~/Tn7EZe
// 设置对象标识范围。
6qi~h@^+Bk;q5K$`m+]132979int set_window ( LPCSTR window [, int timeout ] );
// start_session 函数在 Baan51Testing软件测试网.Dpe;R'z"Q5Wt/qI
// 服务器上开始指定的会话。51Testing软件测试网BT3B1fOb-a
int start_session ( LPCSTR session );
// static_get_text 函数返回在指定51Testing软件测试网)`-Uk}YnW)DG,E
// 静态 text 对象中找到的所有文本。
&Rx$@G2R&w(Mp132979int static_get_text ( LPCSTR static_obj, LPCSTR out_string );
4_eg-g_v1KA.E*H3b132979// tab_select_item 函数选择一个选项卡项目。51Testing软件测试网(FF"eZ_q%b5a
int tab_select_item ( LPCSTR tab, LPCSTR item );51Testing软件测试网(BK,a3N,C
// tbl_activate_cell 函数在指定表单元格中
o.K8f$xo
R;q132979// 按 Enter 键。如果指定了列名,LoadRunner51Testing软件测试网,M+lWzw P'h
// 将直接从数据库中获取该名称。
P|!of4Xq~f132979int tbl_activate_cell (LPCSTR table, LPCSTR row, LPCSTR column );
g#GZB9M132979// tbl_get_cell_data 函数根据51Testing软件测试网)Km(p7r5X5Gy{
// 单元格包含的数据类型获取表中51Testing软件测试网6e,F'uYV-H"j8v
// 指定单元格的内容。如果指定了51Testing软件测试网:F b8M{i&j[
// 列名,将从数据库自身(而非应用
|a:Ix|&E132979// 程序)中获取该名称。
5~8j6MhXe^132979int tbl_get_cell_data (LPCSTR table, LPCSTR row, LPCSTR column, LPCSTR out_text );
u&MTU0_:Ip132979// tbl_get_selected_cell 函数
sH:y{xxD9v8WJ132979// 检索焦点所在的表单元格的行号和
rE;~?'K1xsa4|9Lm132979// 列名。注意,列名取自数据库自身,51Testing软件测试网%W6ir4f[aQ
// 而非应用程序。51Testing软件测试网KkW?9kuHIl
int tbl_get_selected_cell (LPCSTR table, char *out_row, char *out_column );
// tbl_press_zoom_button 函数51Testing软件测试网8\x&T}m
// 激活指定表单元格的缩放窗口。
czX'|*W;Ez132
TAG: