51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1777|回复: 1
打印 上一主题 下一主题

WinRunner:ddt function to retrieve data

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-10-30 14:21:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Description

      ddt function to retrieve data.


Solution

      An excellent function to use when you have loads of columns in you spreadsheet and dont want to read in each one with
value = ddt_val(table, "value");

This function will create an array which will hold data of the current row. The column name from the table is used as the index for the array.

an example of the function call is:
funcDdtBuildArray(table,table_Row,dataArray);

email nkaria@ctc.uk.com if you have any questions.


public function funcDdtBuildArray(in table, in i, out Array[]){

auto j,parList,parNum, parArray[];

ddt_get_parameters(table,parList,parNum);
split(parList,parArray," ");
ddt_set_row(table,i);

for(j=1;j<=parNum;j++){

Array[parArray[j]]=ddt_val(table,parArray[j]);
}
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2006-10-30 14:22:50 | 只看该作者

WinRunner:To click on a dynamic link

Description

      Dynamic links cannot be added in the GUI MAP becuase they change so here's a function that will help you add the link to the GUI MAP temporarily and also click on the link


Solution

      public function web_click_dynamic_link(in link)
{
auto res_arr[];

#extern FalconASGui;
GUI_add ("","page_name",link,"{class: object,MSW_class: html_text_link,html_name: \"" & link & "\"}");

set_window("page_name",10);
win_find_text("page_name",link,res_arr);
win_click_on_text("page_name",link,res_arr[1],res_arr[2],res_arr[3],res_arr[4],FALSE,LEFT);
wait(3);

web_sync(10);
GUI_delete("","page_name",link);
}
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-15 16:54 , Processed in 0.074214 second(s), 24 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表