Ruby 测试完成/执行8韩元';t刷新映射信息,除非它';这是通过COM完成的
我正在TestCompleteV8中运行一个测试脚本。内存中的对象图已过期(出现一个对话框) 我运行以下VBScript代码Ruby 测试完成/执行8韩元';t刷新映射信息,除非它';这是通过COM完成的,ruby,testcomplete,Ruby,Testcomplete,我正在TestCompleteV8中运行一个测试脚本。内存中的对象图已过期(出现一个对话框) 我运行以下VBScript代码 Sys.Process("iexplore").RefreshMappingInfo() 我收到以下错误消息 Unable to find the object RefreshMappingInfo. See Additional Information for details. The object with the specified attributes doe
Sys.Process("iexplore").RefreshMappingInfo()
我收到以下错误消息
Unable to find the object RefreshMappingInfo. See Additional Information for details.
The object with the specified attributes does not exist.
Possible causes of the error
此错误与TC将方法调用解释为试图查找控件有关
真奇怪。。如果我通过COM连接到TC8并执行相同的代码,它就可以正常工作。
所以在ruby中:
require 'win32ole'
tc = WIN32OLE.connect("TestComplete.TestCompleteApplication.8")
integration = tc.integration
Sys = integration.GetObjectByName("Sys")
puts Sys.Process("iexplore").Page("http://localhost:50563/x.aspx") _
.Form("form1").Panel("silverlightControlHost").Object(0).UIAObject("Popup").Exists
' This returns false
Sys.Process("iexplore").RefreshMappingInfo()
' No error raised
puts Sys.Process("iexplore").Page("http://localhost:50563/x.aspx") _
.Form("form1").Panel("silverlightControlHost").Object(0).UIAObject("Popup").Exists
' returns true
为什么这在测试中不起作用?
如何修复它?TestComplete有三个对象树:
- Sys.Process(“iexplore”).Refresh()
- 别名.IExplore.RefreshMappingInfo()
- Sys.Process(“iexplore”).Refresh()
- 别名.IExplore.RefreshMappingInfo()