51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3875|回复: 3
打印 上一主题 下一主题

官网上看到的.或许对某些人有帮助.

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-11-20 15:41:07 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
D:\Program Files\IBM\Rational\SDP\6.0\FunctionalTester\eclipse\plugins\com.rational.test.ft.wswplugin_6.1.0\rational_ft.rftcust


Problem
This technote describes the record and playback issue of HTML tag <span> and also suggests a solution for the problem.  
  
Solution
If you are using the following code to submit a form in the web page:

<span class="button" label="confirm" click="tagForm.doSubmit();"></span>

IBM&reg; Rational&reg; Functional Tester (RFT) cannot recognise this particular control and therefore does not click on the control during playback.

The test script recorded:

table_htmlTable_2().click(atCell(atRow(atIndex(1)), atColumn(atIndex(0))));

During playback, it cannot recognize the table_htmlTable_2_2().


To solve the problem, please refer to the following:

1. Open rational_ft.rftcust in the plugin install dir (should be: c:\program files\ibm\rational\sdp\6.0\functionaltester\eclipse\plugins\com.rational.test.ft.wswplugin_6.1.0)

2. Find the HTML proxy mapping for button:
...
<Obj L=".Proxy">
<ClassName>com.rational.test.ft.domain.html.PushbuttonProxy</ClassName>
<Replaces/>
<UsedBy>Html.INPUT.button</UsedBy>
<UsedBy>Html.INPUT.submit</UsedBy>
<UsedBy>Html.INPUT.reset</UsedBy>
<UsedBy>Html.INPUT.image</UsedBy>
<UsedBy>Html.BUTTON</UsedBy>
<UsedBy>Html.LABEL</UsedBy>
</Obj>
...

3. Add the mapping (UsedBy) for SPAN after the "BUTTON" entry and before the closing OBJ tag: <UsedBy>Html.SPAN</UsedBy>

4. Now it looks like:
<Obj L=".Proxy">
<ClassName>com.rational.test.ft.domain.html.PushbuttonProxy</ClassName>
<Replaces/>
<UsedBy>Html.INPUT.button</UsedBy>
<UsedBy>Html.INPUT.submit</UsedBy>
<UsedBy>Html.INPUT.reset</UsedBy>
<UsedBy>Html.INPUT.image</UsedBy>
<UsedBy>Html.BUTTON</UsedBy>
<UsedBy>Html.LABEL</UsedBy>
<UsedBy>Html.SPAN</UsedBy>
</Obj>

5. Make sure nothing RFT related is running (including enabled applications) because these settings are loaded in global memory so they won't apply until a full restart of RFT.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2007-11-30 18:39:22 | 只看该作者
楼上,看看zhichao.su的贴,就知道为什么有这个需要了。

http://bbs.51testing.com/thread-99658-1-1.html
回复 支持 反对

使用道具 举报

  • TA的每日心情
    开心
    2016-4-11 12:33
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    3#
    发表于 2007-11-29 14:46:17 | 只看该作者
    不知道能行么? 不过我做的测试都能识别你说的
    table_htmlTable_2().click(atCell(atRow(atIndex(1)), atColumn(atIndex(0))));


    这句在我的Script里运行是没问题的
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    2#
     楼主| 发表于 2007-11-20 15:44:04 | 只看该作者
    这样DIV/SPAN等标记就能认识了。个人觉得其实也没什么意义。除非你的开发很bt
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-11-8 19:49 , Processed in 0.078343 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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