loadrunner 函数说明(转载)
上一篇 / 下一篇 2009-06-14 14:11:11 / 个人分类:loadrunner
g%dH|\:@C`1WJ0// button_press 函数激活指定的推按钮。
5Ljk UT`,G8cGE0int button_press ( LPCSTR button );
// button_set 函数将按钮状态设置为 ON 或 OFF。
;A,s-k8pr$d@0int button_set ( LPCSTR button, int state );
&}|cd9d2@s
Cg0// close_session 函数关闭所有打开的窗口并结束51Testing软件测试网+j!?K9x,S
// 当前的 Baan 会话。在 Baan 模板中创建的此函数
v"es7Nj
R,i
S0// 出现在脚本的 vuser_end 部分中。
!kVGq
m&onpr9P0int close_session();51Testing软件测试网j_l D@0`E
A#xaN5t5gc Q.q0// edit_get_text 函数返回在指定 edit 对象中
:rw$^!q1oa7A.e t0// 找到的所有文本。若要从特定块中读取文本,51Testing软件测试网(Jk:ZOg
// 请使用 edit_get_block。51Testing软件测试网'P+S{[(Y"GBe.g1L
int edit_get_text ( LPCSTR edit, char *out_string );
// edit_set 函数使用指定的字符串设置 edit 对象的
-HBd:Ixl0// 内容。该字符串将替换任何现有字符串。51Testing软件测试网5E _]4s.F
int edit_set ( LPCSTR edit, LPCSTR text );51Testing软件测试网4D#X |
T(`6_1~%q4Ch
+v'i+E
W'pM,Rj
Vd0// edit_set_insert_pos 函数将光标放置
nwd'U(c+P0// 在 edit 对象内的指定位置。51Testing软件测试网tm;o+U3Ht;A
int edit_set_insert_pos (LPCSTR edit, int row, int column );
// edit_set_selection 函数突出显示指定文本。
w|}lb-p@0int edit_set_selection ( LPCSTR edit, int start_row, int start_column, int end_row, int end_column );
KVb0O!]0// edit_type 函数将文本字符串输入到 edit
wXr(Xv
z0// 对象中。该文本字符串不会替换现有字符串;51Testing软件测试网g0Dj}7Di5|i1c&]
// 它替换的是位于当前光标位置的指定文本。
T$Z1\
@{
[;lZ0int edit_type ( LPCSTR edit, LPCSTR text );
#Z/\jHX~!L0// init_session 函数通过指定登录数据和配置
(yD5\N
eu0Gg3`F0// 信息打开 Baan 连接。此函数向 Baan 服务器
Tl%_4}:U1F*l!Z9o$}0// 呈现包含在 Baan Configuration 部分中
X]c ` l1\0// 的信息。
nuO6A%al8Ty0int init_session ( char * host, char * user, char *password, char *BSE, char *Bshell_name, char * settings );
// list_activate_item 函数双击列表中的项目。
"_A4y[n"RY
ZyT[n0// 项目可由其逻辑名称指定。51Testing软件测试网!A!],Sx2@'z`u
int list_activate_item ( LPCSTR list, LPCSTR item );
// list_collapse_item 函数隐藏展开的 TreeView
!v{*HzP!?6|-ON0// 列表中的子项,例如文件夹中的各个文件。51Testing软件测试网,X U6jFg_n0W Z&RF
int list_collapse_item (LPCSTR list, LPCSTR item );51Testing软件测试网J)[z-?.|0`E7e7G^,}
// list_expand_item 函数显示展开的51Testing软件测试网$n|
N*p|f
x9c
// TreeView 列表中所隐藏的子项,例如
.PH)eJda"s.n0// 文件夹中的各个文件。51Testing软件测试网R'_pmM
ci
E#\
int list_expand_item (LPCSTR list, LPCSTR item );51Testing软件测试网X$u [{ {#m0Wkl$`v
g
YVSY$?Q0// list_get_selected 函数返回列表中的选定51Testing软件测试网&ns1M[4w
// 项目。它既查找标准列表,也查找多选项列表。
8]\D u$w1h9n0int list_get_selected (LPCSTR list, LPCSTR out_item, LPCSTR out_num );
;?i)A:}9j p1Cs0// list_select_item 函数从列表中选择项目
+cJ3OF"C0// (在项目上执行一次鼠标单击)。项目可由
#LN
cx2N ]0// 其名称或数字索引指定。索引被指定为一个
9xLW6R\ ZXV0// 字符串,并前置有字符 #。列表中的第一个51Testing软件测试网5xxe NN~
^
// 项目编号为 0。例如,列表中的第三个项目
5C$f'v3j$@Wo0k0// 将表示为 "#2"。51Testing软件测试网hr(Q6G:g
int list_select_item ( LPCSTR list, LPCSTR item );
3\;R%p7Y+q8hF0// menu_select_item 函数根据菜单
;t!A\~,^,OS0// 的逻辑名称和项目名称从菜单中选择51Testing软件测试网;_zZ'W:I(J
// 项目。注意,菜单和项目表示为单个51Testing软件测试网,W Z$I&|;p:|-AX7r"_
// 字符串,并使用分号分隔。
$s"yo
p@&y\0int menu_select_item ( LPCSTR menu_item );51Testing软件测试网D4bt]7?)P5I$An#{
// obj_get_info 函数检索指定属性的值,51Testing软件测试网3c+E5ge6c1c%CL2A W m
// 并将其存储在 out_value 中。51Testing软件测试网N`\qz
int obj_get_info ( LPCSTR object, LPCSTR property, char *out_value );51Testing软件测试网t!D$P}b vGv!_
// obj_get_text 函数从指定的对象
~
[7u~wE0// 或对象区域中读取文本。51Testing软件测试网^2o|u/~j4RZ
int obj_get_text (LPCSTR object, LPCSTR out_text );
DN)g,_+^` ]1p0// obj_mouse_click 函数在对象内的51Testing软件测试网4f,x3U+H8GH5~(E4]S4d
// 指定坐标处单击鼠标。51Testing软件测试网O,LT^C lg0}
int obj_mouse_click ( LPCSTR object, int x, int y, [mouse_button] );51Testing软件测试网[rx^dp.?a
// obj_mouse_dbl_click 函数在对象内的
?'J6e{:Nn+q0// 指定坐标处双击鼠标。
e&m h.N^o3O0int obj_mouse_dbl_click ( LPCSTR object, int x, int y, [mouse_button] );51Testing软件测试网SR'Mpl8m
// obj_mouse_drag 函数在 GUI
"H\ fc8}0// 对象中执行鼠标拖动操作。指定的51Testing软件测试网fo5M@!P\Z9Y
// 坐标是相对于 GUI 对象(而非
G0k MI'FZp,f0// 屏幕)的左上角。51Testing软件测试网R s)w9m5b`c
int obj_mouse_drag (LPCSTR object, int start_x, int start_y, int end_x, int end_y, [ ButtonT mouse_button] );
k%s4wT(w{"E6OS0// obj_type 函数指定将 keyboard_input51Testing软件测试网-ZzF%w0G]{?
// 发送到的目标对象。51Testing软件测试网)RrSu$V
int obj_type ( LPCSTR object, unsigned char keyboard_input, [unsigned char modifier ] );51Testing软件测试网)E_(oQuCI&d
wR+{_*Vj!\\0// obj_wait_info 函数等待对象
(W:l;U4G@0// 属性达到指定值,然后继续
G v!D(o/B0// 测试运行。如果未达到指定
Q4b7Z5UgX0// 值,则函数将一直等到时间51Testing软件测试网3{f1a C/i;AL
// 到期,然后再继续测试。51Testing软件测试网geVk5i
Ld t}(E
int obj_wait_info (LPCSTR object, LPCSTR property, LPCSTR value, UINT time );
// scroll_drag_from_min 函数将滚动屏
r7vVYE"U0// 移动到与最小位置相距指定距离的位置。51Testing软件测试网&l~!a*G)r$p
int scroll_drag_from_min ( LPCSTR object, [int orientation], int position );51Testing软件测试网Jdn6fM1P8ldITJZ
J)o9v0n
b
x:O Wn-sB*{0// scroll_line 函数滚动指定行数。
)t5bbmz ag0// 此函数可用于滚动栏和滑块对象。51Testing软件测试网!]sf
lS0x;u
int scroll_line ( LPCSTR scroll, [ScrollT orientation], int lines );51Testing软件测试网9h5NqmPJ9O
js
// scroll_page 函数将滚动屏移动指定页数。51Testing软件测试网Z%KZ0f
ZF
int scroll_page ( LPCSTR scroll, [ScrollT orientation], int pages );
%D6N,a^X5s+^0// set_default_timeout 函数设置回放
-Q] Ed^nWr0{s$S#H0// 期间 Baan Vuser 函数的超时期间段。51Testing软件测试网xj$P+u7R.\({
// 例如,当脚本执行 set_window 函数
4f&J4T5_Jh.z"]0// 时,如果窗口在指定超时时间段内没有51Testing软件测试网j[9K
dU|N0F*`
// 出现,则会生成错误。51Testing软件测试网:Vu'[B V1h&hYu}
void set_default_timeout ( long time );51Testing软件测试网H&vsQ+oILWgY
// set_exception 函数指定在发生异常时
-rya2v:ur|0// 应执行的操作。应指定要调用以处理异常51Testing软件测试网c?+@b!PT&qIH
// 窗口的函数。51Testing软件测试网2E:eGqY3M6^QU,x7o
void set_exception ( LPCSTR title, long function );
// set_think_time 函数指定脚本执行51Testing软件测试网I*eY!as
// 期间要使用的思考时间范围。运行脚本
)J ^QCq.R)~n0// 时,LoadRunner 使用指定范围内的
5V*G#Py*k)l4gr0// 随机思考时间,并在每个操作完成后51Testing软件测试网,UI;C5S8rGe*`6@y
// 暂停该思考时间长度。
E,O+W3?
{(|1l0void set_think_time ( USHORT start_range, USHORT end_range );
// set_window 函数将输入定向到
ib*V x~0// 当前应用程序窗口并在 GUI 图中
#@@M2g2A G%c9n0// 设置对象标识范围。
g3b*e^ }0int set_window ( LPCSTR window [, int timeout ] );
p+grzePL&kWH0// start_session 函数在 Baan
g$u+@9k0m3Y"Od0// 服务器上开始指定的会话。
0ZK6IZd#\#ToM0int start_session ( LPCSTR session );
// static_get_text 函数返回在指定51Testing软件测试网W5x5SJ2or#?
// 静态 text 对象中找到的所有文本。51Testing软件测试网/Wji6n!hR1U
int static_get_text ( LPCSTR static_obj, LPCSTR out_string );
// tab_select_item 函数选择一个选项卡项目。51Testing软件测试网!uD'p cFb9T
R
X
int tab_select_item ( LPCSTR tab, LPCSTR item );
&`0l!bN)eis0// tbl_activate_cell 函数在指定表单元格中
7jn,{uiL0// 按 Enter 键。如果指定了列名,LoadRunner51Testing软件测试网4\(]#a%h(Q
// 将直接从数据库中获取该名称。
|4W!h3S-V*S:{0int tbl_activate_cell (LPCSTR table, LPCSTR row, LPCSTR column );
// tbl_get_cell_data 函数根据
n2L-a$uAQ3\0// 单元格包含的数据类型获取表中
Ej)GUG;h0// 指定单元格的内容。如果指定了
gj#u+PG'N9B5r0// 列名,将从数据库自身(而非应用51Testing软件测试网(c)bJ
bE5?g eW
// 程序)中获取该名称。51Testing软件测试网k(Noe7{5p"dg
int tbl_get_cell_data (LPCSTR table, LPCSTR row, LPCSTR column, LPCSTR out_text );51Testing软件测试网,[ X]9mg:d
// tbl_get_selected_cell 函数51Testing软件测试网n$v,r%{$U&q,AX
// 检索焦点所在的表单元格的行号和
0PYjCC mg6mi0// 列名。注意,列名取自数据库自身,
%N!Z!M`Rs%r0// 而非应用程序。51Testing软件测试网]&Bg~+~a.c4Sq(k
int tbl_get_selected_cell (LPCSTR table, char *out_row, char *out_column );51Testing软件测试网TR??5M O/W#jf,Y
// tbl_press_zoom_button 函数
oQt6~%f^;i,kf0// 激活指定表单元格的缩放窗口。51Testing软件测试网m8`/V!P'|~
int tbl_press_zoom_button ( LPCSTR table, LPCSTR row, LPCSTR column );51Testing软件测试网9Zo:b$[1p
Q&SO8dG-G,U6P0// tbl_set_cell_data 函数根据单元格
t
W'j!a3reT8Py0// 包含的数据类型使用指定数据设置单元格51Testing软件测试网.Pu?)ql
l5jWw8Z4P
// 的值。如果指定了列名,LoadRunner
1o8baN!D0// 将直接从数据库中获取该名称。
t J ^t"S6G%mu0int tbl_set_cell_data (LPCSTR table, LPCSTR row, LPCSTR column, LPCSTR data );51Testing软件测试网#D1P$Wj"z
// tbl_set_selected_cell 函数将焦点
!sNH`*M2yl _7w
s|T0// 设置到表中的指定单元格上。指定列名时,
O&h
H'Dr
g~0// LoadRunner 将直接从数据库中获取该名称。51Testing软件测试网mZ'mC5s
yt
int tbl_set_selected_cell (LPCSTR table, LPCSTR row, LPCSTR column );
&xF`L q0// tbl_set_selected_row 函数选择表中的指定行。51Testing软件测试网qL(]R)b]&\
int tbl_set_selected_row (LPCSTR table, LPCSTR row );51Testing软件测试网7\y#X$?,?)dP&\9Kkl
s PcyYX:E0// tbl_set_selected_rows 函数选择指定行范围。
/SO|3Pu R!G;JL _#{0int tbl_set_selected_rows(LPCSTR table, LPCSTR from_row , LPCSTR to_row );51Testing软件测试网?AkC+LaLM
7CTHVUm-O^4d0// tbl_wait_selected_cell 函数等待51Testing软件测试网:Pl"~?EGb
// 表单元格显示后,再继续脚本执行。51Testing软件测试网La(A(PS U
int tbl_wait_selected_cell (LPCSTR table, char *row, char *column, UINT time );
// toolbar_button_press 函数激活工具栏中的按钮。51Testing软件测试网'xD~)d-F&xgVF
int toolbar_button_press (LPCSTR toolbar, LPCSTR button );
t k^pWO,^V#wZ)T0// type 函数描述发送给用于测试51Testing软件测试网Ek](t&V&}z
// 的应用程序的键盘输入。
u!c]5U4z'CC3I0int type (LPCSTR keyboard_input );
P)shi6^@@X2o!@~q0// win_activate 函数通过向指定窗口51Testing软件测试网1qGxH"WR(`q
// 授予焦点并将其升到显示器最上端,51Testing软件测试网A x4c5NNP-TL6r
// 使其成为活动窗口(等价于单击窗口51Testing软件测试网\h
A ~a_,lN|.g
// 标题栏)。所有后续输入都将提交给
'k"K'P?&^;eB0// 此窗口。51Testing软件测试网7h4H
Oq4Zg9A{0W
int win_activate (LPCSTR window );51Testing软件测试网 f
BQ;@)z~;oA*z%V
// win_close 函数关闭指定窗口。
V8['t4i.c?m'`(s0int win_close ( LPCSTR window );
QtDT8uI1Fk,^0// win_get_info 函数检索指定属性的值51Testing软件测试网4Hs Q(d\~E
// 并将其存储在 out_value 中。
c"d*]pP]_
_&k0int win_get_info ( LPCSTR window, LPCSTR property, char *out_value );51Testing软件测试网Kxkaa8c
*ZVC3OQ0xva:U0// win_get_text 函数从指定窗口或
A
W#G
z k&{$Y+C/[I0// 窗口区域读取文本。
w~Z8eir^a0int win_get_text ( LPCSTR window, LPCSTR out_text );
// win_max 函数将指定窗口
R;cGK1^)K6\0// 最大化以充满整个屏幕。
%}"c%]{-\ r7pC0int win_max (LPCSTR window );
P.@].^4BYt
e0// win_min 函数将指定窗口最小化为图标。51Testing软件测试网PDK `T8EH
int win_min (LPCSTR window );51Testing软件测试网B${$||5ey;xM
B%U(EDx
// win_mouse_click 函数在选中窗口
v$T%qnrB+U `u0// 的指定坐标处执行鼠标单击操作。51Testing软件测试网6CZ"nC)x/qX"{h
int win_mouse_click (LPCSTR window, int x, int y, ButtonT button );51Testing软件测试网NJ-Q4m&j/e4~v?/L0s
R]F+JjG)DE]
E G0// win_mouse_dbl_click 函数在选中窗口51Testing软件测试网
eoU:?ZU c
// 的指定坐标处执行鼠标双击操作。
[y#t,y C0int win_mouse_dbl_click (LPCSTR window, int x, int y, ButtonT button );
// win_mouse_drag 函数在窗口内执行51Testing软件测试网k5b&R9q7HY0p%tTM
// 鼠标拖动操作。注意,指定的坐标是51Testing软件测试网e#^)EvG O
// 相对于窗口(而非屏幕)的左上角。51Testing软件测试网TK"IJ]KPO
int win_mouse_drag (LPCSTR window, int start_x, int start_y, int end_x, int end_y, ButtonT button );51Testing软件测试网$JD5`1I
a3[2eSZ|
:F:d1a!w#B*m"@K[0// win_move 函数将窗口移动到新的绝对位置。
&p0i6zC S5n1R2\0int win_move ( LPCSTR window, int x, int y );51Testing软件测试网#?9i!d/j~
(RHtpBu
o6I0// win_resize 函数更改窗口的位置。51Testing软件测试网o
aW-dC&~r@
int win_resize ( LPCSTR window, int width, int height );
|.@lc"AJ;D0// win_restore 函数将窗口从图标化
,^)O+RLe_8?wDy0// 或最大化状态还原为其原始大小。
;LL&GSW(KR/}1B0int win_restore (LPCSTR window );
P|+n%K7`;v@0// win_wait_info 函数等待窗口51Testing软件测试网-eme:K#E#a
// 属性达到指定值,然后继续测试51Testing软件测试网yDt
yp
// 运行。如果未达到指定值,则函数
'A)ox]}N0// 将一直等到时间到期,然后再继51Testing软件测试网M9L
\.ZP!@7s,@\t
// 续测试。
^T[`!zb0int win_wait_info (LPCSTR window, LPCSTR property, LPCSTR value, UINT time );51Testing软件测试网:~3_2{PR%@
x)h?:b8O
6j|+]t?v0// win_type 函数指定 keyboard_input51Testing软件测试网Qu7M,Hz-i)|ydX+Gh
// 将发送到的目标窗口。
#[9P
US3zq/YX{Y0int win_type (LPCSTR window, LPCSTR keyboard_input );
// ctrx_<obj>_get_info 函数系列将属性51Testing软件测试网V7V'sO b
// 的值分配给值缓冲区。ctrx_obj_get_info51Testing软件测试网bEIJJ!X5Sv
// 是一般函数,它可以适用于任何由录制器
/w5p
y] f!nBh0// 所标识为对象的对象。
9|)W2nV;@wc"TU%T!o0int ctrx_obj_get_info( const char * window_name, long xpos, long ypos, eObjAttribute attribute, char *value, CTRX_LAST );
`c#EK,[0// ctrx_<obj>_get_info 函数系列将属性的值
E%a}I)}k6N0b0// 分配给值缓冲区。ctrx_button_get_info
p*^;W)t+Z5E0// 获取命令按钮的信息。51Testing软件测试网V0?
{&uB5f,W
int ctrx_button_get_info( const char * window_name, long xpos, long ypos, eObjAttribute attribute, char *value, CTRX_LAST );
:K+lf.G
er7{\"R4D0// ctrx_<obj>_get_info 函数系列将属性的值51Testing软件测试网+tsE3f*q:S5}1m
// 分配给值缓冲区。ctrx_edit_get_info
8K$x#r-c"}0z0// 获取文本框的信息。51Testing软件测试网#R,~#@&_h&R,gJ!`
int ctrx_edit_get_info( const char * window_name, long xpos, long ypos, eObjAttribute attribute, char *value, CTRX_LAST );51Testing软件测试网:pA,VEH;O*X
3g&Q-nH6b ev0// ctrx_<obj>_get_info 函数系列将属性的值51Testing软件测试网$};aIu%Z0E[6U
// 分配给值缓冲区。ctrx_list_get_info51Testing软件测试网[$z,zP^\
// 获取列表框的信息。51Testing软件测试网EG2v R)a'U
int ctrx_list_get_info( const char * window_name, long xpos, long ypos, eObjAttribute attribute, char *value, CTRX_LAST );
// ctrx_connect_server 将 Citrix 客户端连接到 Citrix 服务器。51Testing软件测试网&R*[]4x(@
int ctrx_connect_server (char * server_name, char * user_name, char * password, char * domain);
// ctrx_disconnect_server 断开客户端与 Citrix 服务器的连接。
Y@&Ri E0int ctrx_disconnect_server (char * server_name);
5B%`Q-`4`#G;q
{:o
G0// ctrx_nfuse_connect 使用 NFUSE 应用51Testing软件测试网*M9E)DE3J!|
// 程序门户建立与 Citrix 服务器的连接。在51Testing软件测试网'oGm;L)ViC
// 定义 NFUSE 门户的个性化规范的 ICA 文件51Testing软件测试网9N+s%y#e{
a
q.]
// 中找到的规范将从服务器上下载,在此之后
,N%R#Y6i+v
P8]0// 建立连接。51Testing软件测试网s1c1k,P+[ WbS
int ctrx_nfuse_connect(char * url);51Testing软件测试网 _ S9kze#H*YU9V
\U?s
// 使用 ctrx_get_bitmap_value51Testing软件测试网n:x7ku(Z
// 检索位图的哈希字符串值以用于您
OWpG3Zx0^0// 的自定义同步函数中。位图坐标由
Y@g
EdAe8C4S:V0// 前四个参数指定。51Testing软件测试网(RX%Z4D5ib
int ctrx_get_bitmap_value (long x_start, long y_start, long width, long height, char * buffer);51Testing软件测试网Sy+JtdtC3z
// ctrx_get_text 将矩形中的文本分配到 text_buffer51Testing软件测试网2S5^2I,?]
L `2a-i
// 中。随后,文本可被用于关联。51Testing软件测试网
K&|z-p l
?
int ctrx_get_text( char *window_name, long xpos, long ypos, long width, long height, char * filename, char * text_buffer, CTRX_LAST );
// ctrx_get_text_location 在 xpos、
| Y*t W k0// ypos、width 和 height 指定区域中
3|p3b` f C
^N|m0// 搜索指定文本。如果找到字符串,当函数51Testing软件测试网ob,ZX E9@
// 返回后,xpos 和 ypos 即为找到文本的51Testing软件测试网)p.NM(m CR&kk*C;e:|F
// 位置。如果未找到字符串,xpos 和 ypos51Testing软件测试网?&UP#B:jCl
// 则为零。51Testing软件测试网 |-H9CD"z
d#N2U
int ctrx_get_text_location( LPCSTR window_name, long *xpos, long *ypos, long *width, long *height, LPSTR text, long bMatchWholeWordOnly, LPCSTR filename, CTRX_LAST );51Testing软件测试网\lr[I2J
// ctrx_get_waiting_time 从运行时设置中获取当前等待
(^vBv*Ad0N*P^0// 时间,或者通过 ctrx_set_waiting_time 设置的值。51Testing软件测试网p1p-p B&Ma3hM|I:G)m
int ctrx_get_waiting_time ( long * time );
// 使用 ctrx_get_window_name 检索51Testing软件测试网!K8l3F4p]9O
// 当前获得焦点的窗口的名称。
A
EZx)~7]Bn0int ctrx_get_window_name (LPSTR buffer);
k.K0xT)C%[s0// 使用 ctrx_get_window_position51Testing软件测试网I:~J$WZ`1[
// 检索名为 title 变量值的窗口的位置。51Testing软件测试网ezw%_#jN4U{1_-E
// 如果 title 为 NULL,则函数将检索
\7P&Ds,y n0// 当前拥有焦点的窗口的位置。
C#H;J$o8W/wH#V0int ctrx_get_window_position (LPSTR title, long *xpos, long *ypos, long *width, long *height);
// ctrx_list_select_item 函数从列表中选择项目。51Testing软件测试网%U5ByyI3nC)l
// 它支持 ListBox 或 ComboBox 类的列表。51Testing软件测试网/],W7nDpM8] F~(Q
int ctrx_list_select_item(char * window_name, long xpos, long ypos, char * item, CTRX_LAST );
// ctrx_menu_select_item 突出显示51Testing软件测试网Wn0f0YjMry2O
// 菜单中的项目,但不激活它。
I0`p!Z:i0int ctrx_menu_select_item ( char * window_name, char * menu_path, CTRX_LAST) ;
.L2T*v{;\
y0// ctrx_mouse_click 等待窗口 window_name
0e)G z,a;Y8n$Wq0// 出现,然后执行鼠标单击操作。51Testing软件测试网5x:NOr O6Bm
int ctrx_mouse_click (long x_pos, long y_pos, long mouse_button, long key_modifier, char * window_name);
// ctrx_obj_mouse_click 等待窗口 window_name
D:Px8R#z]]"{RmT0// 出现,然后执行鼠标单击操作。51Testing软件测试网H/f%J9[,G4dc+J,?
int ctrx_obj_mouse_click (const char * obj_desc, long x_pos, long y_pos, long mouse_button, long key_modifier, char * window_name);51Testing软件测试网}v5Q(`x;Y[R
k)a
rx J[0// ctrx_mouse_double_click 等待窗口 window_name
9y8BSJ v0// 出现,然后执行鼠标双击操作。
2`\}knQ0int ctrx_mouse_double_click (long x_pos, long y_pos, long mouse_button, long key_modifier, char * window_name);
)f:](tfZ7AO0// ctrx_obj_mouse_double_click 等待窗口 window_name
#Ki/x+p.n q"Ub-z0// 出现,然后执行鼠标双击操作。
v`tb2vr0int ctrx_obj_mouse_double_click (const char * obj_desc, long x_pos, long y_pos, long mouse_button, long key_modifier, char * window_name);51Testing软件测试网8O-ED/]+IQEl
,B.UX!E`5r0// ctrx_mouse_down 等待窗口 window_name51Testing软件测试网pNt1xq!h,n:Tzf{
// 出现,然后执行按下鼠标按键操作。
rU1m2hV*H0FqJ0int ctrx_mouse_down(long x_pos, long y_pos, long mouse_button, long key_modifier, char * window_name);
7L;R2kw#Z,h;M$t0// ctrx_obj_mouse_down 等待窗口 window_name51Testing软件测试网l&f3Lm&G9Wu(E!j
// 出现,然后执行按下鼠标按键操作。51Testing软件测试网(y
B/Z/r&Wm0G I
int ctrx_obj_mouse_down(const char * obj_desc, long x_pos, long y_pos, long mouse_button, long key_modifier, char * window_name);51Testing软件测试网f\Nu!G"^:w
KYQ;c A
@C U0// ctrx_mouse_up 等待窗口 window_name51Testing软件测试网+kCo{K
// 出现,然后在指定位置执行释放鼠标按键操作。51Testing软件测试网r(c1]~7ni,R8no
int ctrx_mouse_up(long x_pos, long y_pos, long mouse_button, long key_modifier, char * window_name );
k6vTpKzL5vp&N0// ctrx_obj_mouse_up 等待窗口 window_name51Testing软件测试网k'FN8I x6UD
// 出现,然后在指定位置执行释放鼠标按键操作。51Testing软件测试网l$Z
WG+P/c
int ctrx_obj_mouse_up(const char * obj_desc, long x_pos, long y_pos, long mouse_button, long key_modifier, char * window_name );
// ctrx_set_window 是同步函数,它等待
'C5K,p$wcj\7E O0// 窗口出现,然后 Vuser 才在该窗口中模拟
vlil)C"{0// 任何键盘或鼠标活动。
S2s!^3@"@L0int ctrx_set_window (char * window_name);51Testing软件测试网uAUW$U#@
// ctrx_set_window_ex 是同步函数,它至多51Testing软件测试网FZ+Fi2T8qr-T.X;l
// 等待 time 秒,若窗口出现,Vuser 将在该51Testing软件测试网#qW{9n\0GzU
// 窗口中模拟任何键盘或鼠标活动。51Testing软件测试网T4x
e-j RBc
int ctrx_set_window_ex (char * window_name, long time);51Testing软件测试网x&M2^H$[xpneHw
// ctrx_key 模拟用户在 Citrix 客户端中
7QW h K^&Yh3a0// 按下非字母数字键。
UO z"cS;Ay0int ctrx_key (char * key, long int key_modifier);51Testing软件测试网CLPt!gA'I
// 函数 ctrx_type 模拟用户键入字母数字字符。
kho~M5J6F0int ctrx_type (char * data);51Testing软件测试网J[0`)N/tCw
R5M0^8`%f&\0// ctrx_save_bitmap 将位图保存为文件。51Testing软件测试网7b%~q2@"i8x`+Q(U\'c
// 该文件将保存在 Vuser 结果日志目录中。51Testing软件测试网 t5oY)N'u@
int ctrx_save_bitmap( long x_start, long y_start, long width, long height, const char * file_name );51Testing软件测试网w+nw(ex8_
// ctrx_set_connect_opt 在建立 Citrix 客户端51Testing软件测试网R_l!];h1h'arL
// 与 Citrix 服务器的连接之前设置连接选项,然后51Testing软件测试网7r6{+t
oKeV\x}9d
// 执行与服务器的连接。51Testing软件测试网A+aE7x~;k
int ctrx_set_connect_opt (eConnectionOption option, char * value);
// ctrx_set_exception 定义当不规则51Testing软件测试网g:g PW0S8pB
// 事件发生时要执行的操作。此事件必须51Testing软件测试网ns+A2kT
sQ/M8\
// 与名为 window_title 的窗口(通常
$v D ^i$G0// 为弹出式对话框)的外观相关联。当窗口51Testing软件测试网 U?{3Q(l\ l
// 出现时,将调用 handler 函数。51Testing软件测试网![!I/P5B&Q$\sf
\QU
void ctrx_set_exception ( char * window_title, long handler, [void *context]);
.fs5x`t0o q Y0// ctrx_set_waiting_time 更改
R3_!d,j*g&}0// 同步函数默认 60 秒的等待时间。51Testing软件测试网v;e}+}4\,XV"~-Xo
int ctrx_set_waiting_time (long time);
1a'a&Qf$sA0// ctrx_sync_on_bitmap 是同步函数,
m
[,K#R*O+V0// 它等待指定位图出现,然后再继续执行。
C"bU cw)}R.c*e0int ctrx_sync_on_bitmap (long x_start, long y_start, long width, long height, char * hash);
4g|[!m3u5CTij0// ctrx_sync_on_bitmap_change 是同步51Testing软件测试网7|"A$IP:v7ec3_6y
// 函数,它等待指定位图改变,然后再继续执行。51Testing软件测试网8\/aO4vgFq;\
// 该函数通常用在窗口改变而窗口名称保持51Testing软件测试网:G8v'ry`!Cf
m
// 不变的情况下。如果窗口名称改变,51Testing软件测试网#ca
x|{N
// 则 ctrx_set_window 将被自动51Testing软件测试网G bFd_/l
// 生成。
3Y8w2Z/p,lZ0int ctrx_sync_on_bitmap_change (long x_start, long y_start, long width, long height, <extra_args>, CTRX_LAST);
^/UKT6Z0// ctrx_sync_on_obj_info 被调用时,执行将暂停,
.vUt1C`:sm6K0// 直到指定对象的属性具有指定的值。51Testing软件测试网/e2u$B4H4S.W
int ctrx_sync_on_obj_info ( char * window_name, long xpos, long ypos, eObjAttribute attribute, char * value, <CTRX_LAST> );
// ctrx_sync_on_window 是同步函数,
;SeX6[d7q R ]r0// 它等待窗口被创建或变为活动的。51Testing软件测试网(A:LE*P
xA8[
int ctrx_sync_on_window (char * window_name, eWindowEvent event, long x_start, long y_start, long width, long height, char * filename, <CTRX_LAST>);51Testing软件测试网7^8C[-A&V/VP
// ctrx_unset_window 是同步函数,它等待51Testing软件测试网|6fJ4Z[
// 窗口被关闭,然后脚本才继续执行。
}:r*Gw+`1Bk7N/l0int ctrx_unset_window (char * window_name);51Testing软件测试网!ysbFx
o
// ctrx_wait_for_event 是同步函数,51Testing软件测试网-zW)U-K4ID*b]y2f
// 它等待事件发生。51Testing软件测试网{Z9{ p\RC$eM
int ctrx_wait_for_event (char * event);
// 如果窗口存在,ctrx_win_exist 返回 E_OK(零)。
sH
a TS9No&Fd0// 在 window_name 中可以使用通配符 (*)。51Testing软件测试网"o ~Uh!n)?
int ctrx_win_exist (char * window_name, long waiting_time);51Testing软件测试网di$e7B
G`m
M?ZY3p$Gj0// 有关 memchr 的详细信息,请参考 C 语言文档。
?!^#["RHq4G;EA0void *memchr ( const void *s, int c, size_t n );51Testing软件测试网.G"nM/W2k^]e
// 有关 memcmp 的详细信息,请参考 C 语言文档。51Testing软件测试网P~c:b-O6d
int memcmp ( const void *s1, const void *s2, size_t n );
!kuUaG0// memcpy 函数从 src 缓冲区中将 n 个
g*B'PYM1l5v0// 字符复制到 dest 缓冲区。
g:m+@Wd(`^0void *memcpy ( void *dest, const void *src, size_t n );51Testing软件测试网#?"HK!O2T3z1G6_O
// 函数 memmove(以及所有不返回 integer 类型51Testing软件测试网&^WuR j
// 的函数)必须明确在 Vugen 脚本中声明。
:R(p&w dh6D1OEB0void *memmove ( void *dest, const void *src, size_t n );51Testing软件测试网i7KaA!j
// 有关 memset 的详细信息,请参考 C 语言文档。51Testing软件测试网 p8B|-oh
Iht
void *memset ( void *buffer, int c, size_t n );
7Z9]^O+PT0// 有关 getenv 的详细信息,请参考 C 语言文档。
,V)ALX&xs0char *getenv ( const char *varname );51Testing软件测试网K3S|s U`
6pq9A.Px+v0// 有关 putenv 的详细信息,请参考 C 语言文档。51Testing软件测试网:wOA6A`:X5X
int putenv ( const char *envstring );