lovetest6 发表于 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.

lovetest6 发表于 2007-11-20 15:44:04

这样DIV/SPAN等标记就能认识了。个人觉得其实也没什么意义。除非你的开发很bt

unlimit5 发表于 2007-11-29 14:46:17

不知道能行么? 不过我做的测试都能识别你说的
table_htmlTable_2().click(atCell(atRow(atIndex(1)), atColumn(atIndex(0))));


这句在我的Script里运行是没问题的

lovetest6 发表于 2007-11-30 18:39:22

楼上,看看zhichao.su的贴,就知道为什么有这个需要了。

http://bbs.51testing.com/thread-99658-1-1.html
页: [1]
查看完整版本: 官网上看到的.或许对某些人有帮助.