怎么没人问津呢,是不是大家没遇到过这个情况
这两天又研究了一下,因为RFT无法识别PB中dw窗口的单元格,我通过一些代码可以获取dw中某个单元格内容
但是无法将单元格转换为GuiSubitemTestObject类型,在执行Click()操作,其中部分代码如下:
ITestData data = (ITestData)dw_1win2().getTestData("alldata");
ITestDataTable list = (ITestDataTable) data;
Object obj = ((GuiSubitemTestObject)data).getSubitem(atCell(atRow(1),atColumn(1)));
其中dw_1win2为RFT识别的DW窗口名称,运行到第三行出错,
2011年9月23日 下午05时55分04秒 CRFCN0601E: Script2.testMain 有未经处理的异常。
exception_name = java.lang.ClassCastException
exception_message = com.rational.test.ft.vp.impl.TestDataTable incompatible with com.rational.test.ft.object.interfaces.GuiSubitemTestObject
script_name = Script2
script_id = Script2.java
line_number = 37
exception_stack = at Script2.testMain(Script2.java:37)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
at org.eclipse.core.launcher.Main.main(Main.java:30)
又研究了很久实在不知道为何,请各位大侠指教,离成功还有一步之遥。。。。