风动还是旗动?仁者心动。 文字只不过是指月的手指,而不是月亮本身,能透过指月的手指看到月亮本身才是文字的目的所在。

"找不到对象的屏幕点"怎么处理?

上一篇 / 下一篇  2007-07-09 12:03:48 / 个人分类:测试技术

查看( 1991 ) / 评论( 6 )
我在运行脚本的时候报“找不到对象的屏幕点”的错误,不知道有没有人遇到过类似的错误,怎么解决?51Testing软件测试网$dQS;Z5C
51Testing软件测试网qG@[#l
源代码:
\)w;\4H f7gs0...51Testing软件测试网1b G&i#Fo
RootTestObject root = getRootTestObject();
n+\/De/l'DM$[3_0Subitem subitem = atDescendant(".class", "Html.INPUT.text",".id","queryForm:instanceId");51Testing软件测试网!s8^kU9@)v-C n
TestObject[] tos = root.find(subitem);51Testing软件测试网1q2s)IVN^
TextGuiTestObject tto = new TextGuiTestObject(tos[0]);51Testing软件测试网%D.N&\xD0n
tto.setText("11111");51Testing软件测试网N ^dq ~R/R_-n
...51Testing软件测试网#wW b-N5z(\{
51Testing软件测试网'F*b'eQP?In
错误信息:
e:L)s l}051Testing软件测试网 LmcCCX4N$z*m
exception_context = 在“TextGuiTestObject(Ref:RemoteProxyReference{testContext:9cf7000ec6fa, objectId:3050, testObjectClass:TextGuiTestObject})”上调用了 setText()。
#qA!dI aLZ_0exception_name = com.rational.test.ft.UnsupportedActionException
+Ea'l7}%b0exception_message = 找不到对象的屏幕点
I,w.P0J&KiY0scrīpt_name = TestAll51Testing软件测试网@n7fuWl
scrīpt_id = TestAll.java51Testing软件测试网0p3A KjAhRzia&Ln
line_number = 76
U5WSh Zm-|x`'Kx*Q+?0exception_stack = at com.rational.test.ft.domain.html.HtmlGuiProxy.noScreenPointFoundForAction(HtmlGuiProxy.java:2031)
)q8f'~Az5CI J$s` Sh0at com.rational.test.ft.domain.html.HtmlGuiProxy.click(HtmlGuiProxy.java:172)51Testing软件测试网)wG,x:K!k e(t"P
at com.rational.test.ft.domain.html.HtmlGuiProxy.click(HtmlGuiProxy.java:147)
RI#A6QN"D0------------------------------51Testing软件测试网FN'x)S5|*h/a)L
at com.rational.test.ft.domain.ProxyUtilities$SetTextFromGlassRunnable.send(ProxyUtilities.java:250)51Testing软件测试网 z a:]c:{6SZ;k Y `
------------------------------51Testing软件测试网.n|!g"d6|"uh
at com.rational.test.ft.object.interfaces.TextGuiTestObject.setText(TextGuiTestObject.java:97)51Testing软件测试网 } @jK._.g^
at TestAll.testMain(TestAll.java:76)51Testing软件测试网)G9cZ,RT/ya-W
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
c^HDQVsR,nB0at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)51Testing软件测试网T:@:c Z[yY)a+t(P3v
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)51Testing软件测试网d]^)Y@Bar\ l8W
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)51Testing软件测试网n3M ]5?"\s
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)51Testing软件测试网:yRS7n7TycV3g-~&t
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)51Testing软件测试网"wd5X*a5E
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)51Testing软件测试网 { T7g5l\#N&Q9M7z
at org.eclipse.core.launcher.Main.run(Main.java:977)
(\8m0p4ID2TVl0at org.eclipse.core.launcher.Main.main(Main.java:952)

TAG: 测试技术

fox_linda发布于2007-07-10 21:23:36
浅见
很可能是脚本回放的时候,调用click()的时候屏幕刷新了,所以没有找到点
#K:{P;y
H
u!c软件测试,软件测试论坛,软件测试方法,软件测试工具,软件测试流程,软件测试培训,软件测试外包,软件质量管理 ,软件缺陷跟踪,软件配置工具

X
{i
lesfWd
首先定位没有找到那个点,在click()之前可以调用sleep();等待页面更新后再进行下步操作
一文 fzxugang 发布于2007-07-11 09:56:53
应该不是这个问题,我调用click()之前已经调用sleep()了。
e$I Ex ex
woj7UZ;T
www.51testing.com,V!~V5e,Y3[{7Oj
我用这样的代码就可以输入文本www.51testing.comk
k.X-TL%CR


_sX1?#g/B$bZ*u软件测试 - 软件测试论坛 - 软件缺陷跟踪 - 软件配置工具 - 测试用例设计 - Web测试 -  自动化测试工具public void setInstanceId(String instanceId)软件测试 - 软件测试论坛 - 软件缺陷跟踪 - 软件配置工具 - 测试用例设计 - Web测试 -  自动化测试工具1_
j#z7A"E'` ~Z\"b

{软件测试 - 软件测试论坛 - 软件缺陷跟踪 - 软件配置工具 - 测试用例设计 - Web测试 -  自动化测试工具+\Y%`1J:MK7L0y
        fim.getText_instanceId().click(fim.getText_instanceId().getScreenPoint());51Testing软件测试网xNA4b-x2a^0y6[
        fim.getBrowser_htmlBrowser().inputChars(instanceId);
4\8j(}o6m7R XYJhL$Xwww.51testing.com}www.51testing.com&cTk"N}(T9h
Hk)|he G*h
www.51testing.com/O/N4ec,M(K }B
但是选择框仍然不能选择,还是报“找不到对象的屏幕点”
3bnq        P fb4CT/u软件测试 - 软件测试论坛 - 软件缺陷跟踪 - 软件配置工具 - 测试用例设计 - Web测试 -  自动化测试工具
9K        j'aE?1bMM        vwww.51testing.com[ 本帖最后由 fzxugang 于 2007-7-12 09:15 编辑 ]
xxl的个人空间 xxl 发布于2007-07-16 13:51:39
当需要操作的对象不在可以正常操作范围内,就会出现这个异常
一文 fzxugang 发布于2007-07-19 12:33:05
但事实上就在正常操作的范围内,用对象查看器看了一下,发现对象识别错位了一行,也就是说想看某个对象的属性,鼠标必须移动到这个对象的下方才能显示他的属性值
sumagon发布于2007-07-23 10:54:42
有可能是在查找对象的情况下,前一次生成的对象没有释放,而后来生成的对象与之前所生成的对象所在的坐标有差距,所以点击的时候会点不到,查看一下查找到对象的length应该可以看出来...
测试生涯 tiantian010 发布于2010-08-02 09:40:11
我也发现了这个问题,但是使用RFT的查找对象映射的方式添加到脚本中,是可以找到这个对象的
我来说两句

(可选)

日历

« 2024-04-03  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 25426
  • 日志数: 36
  • 建立时间: 2006-12-19
  • 更新时间: 2007-07-09

RSS订阅

Open Toolbar