求助:回放结果总是提示Unexpected Active Windows falure!如何解决?
求助:在GUI Playback Option中设置如下图:按设置应该跳过这个Unexpected Active Windows继续执行,可还是出现
回放结果提示Unexpected Active Windows falure!请版主,高手指教,如何解决? 首先你要搞清楚这个window是怎么样出现的,你当前脚本执行的window对象是否还在 回放时,正常启动应用程序后,就停止了。而在记录脚本时,此时我的操作是点击主菜单中一个子菜单! 如果说你的脚本是要去选一个子菜单然后跳到另外一个页面,而回放的时候没有达到这个目的,那是你脚本有问题 点击主菜单中的那个子菜单后,应该弹出一个对话框!请版主指教:代码如下
Sub Main
Dim Result As Integer
'Initially Recorded: 2005-12-2710:25:31
'Script Name: ÍøÂç¼à¿Ø×Óϵͳ
StartApplication """C:\Program Files\MetarNet\CUNICOM\ÍøÂç¼à¿Ø×Óϵͳ.exe"""
DelayFor (10000)
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
Window SetContext, "Name=frmLogin;VisualText=ÍøÂç¼à¿Ø×Óϵͳ µÇ¼", ""
InputKeys "welcome{ENTER}"
DelayFor (10000)
Window SetContext, "Class=ThunderForm", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
DelayFor (2000)
TabControl Click, "ObjectIndex=1;\;ItemIndex=1", ""
乱码部分为双字节! 你看下脚本到哪句就不执行了 到 Window SetContext, "Class=ThunderForm", ""这行就不行了! 你把你的程序传上来吧 Sub Main
Dim Result As Integer
'Initially Recorded: 2005-12-2714:52:40
'Script Name: Password-menu2
StartApplication """C:\Program Files\MetarNet\CUNICOM\ÍøÂç¼à¿Ø×Óϵͳ.exe"""
DelayFor (10000)
Window SetContext, "Name=frmLogin;VisualText=ÍøÂç¼à¿Ø×Óϵͳ µÇ¼", ""
InputKeys "welcome"
PushButton Click, "Name=commandLogin;VisualText=怬"
Window SetContext, "Class=ThunderMDIForm", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=1", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
Window SetContext, "Name=frmMain;VisualText=ÔÆÄÏÁªÍ¨CDMA×ÛºÏÍø¹Üϵͳ£­ÍøÂç¼à¿Ø×Óϵͳ - [ÐÅÁî×é֯ͼ]", ""
Window SetContext, "Name=frmViewSignalNetMap;VisualText=ÐÅÁî×é֯ͼ", ""
GenericObject Click, "Name=Map1", "Coords=138,65"
GenericObject Click, "Name=Map1", "Coords=134,65"
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
DelayFor (10000)
TabControl Left_Drag, "ObjectIndex=1;\;ItemIndex=0", "Coords=106,9,200,13"
TabControl Click, "ObjectIndex=1;\;ItemIndex=1", ""
DelayFor (10000)
Window SetContext, "Name=frmMain;VisualText=ÔÆÄÏÁªÍ¨CDMA×ÛºÏÍø¹Üϵͳ£­ÍøÂç¼à¿Ø×Óϵͳ - [ÐÅÁî×é֯ͼ]", ""
DelayFor (10000)
Window Click, "", "Coords=181,-17"
GenericObject Click, "Text=DockTop", "Coords=27,7"
Window SetContext, "Class=ddPopup", "Activate=0"
Window Click, "", "Coords=58,86"
DelayFor (10000)
Window SetContext, "Name=frmMain;VisualText=ÔÆÄÏÁªÍ¨CDMA×ÛºÏÍø¹Üϵͳ£­ÍøÂç¼à¿Ø×Óϵͳ - [ÐÅÁî×é֯ͼ]", ""
DelayFor (10000)
Window SetContext, "Name=FrmSecumodifyuserpw;VisualText=ÐÞ¸ÄÓû§¿ÚÁî", ""
InputKeys "welcome"
EditBox Click, "Name=txtUserPW1", "Coords=17,3"
EditBox Left_Drag, "Name=txtOldPw", "Coords=31,5,-13,7"
InputKeys "^c"
Window SetContext, "Class=myXWndClass", ""
Window Click, "", "Coords=2,4"
Window SetContext, "Name=frmMain;VisualText=ÔÆÄÏÁªÍ¨CDMA×ÛºÏÍø¹Üϵͳ£­ÍøÂç¼à¿Ø×Óϵͳ - [ÐÅÁî×é֯ͼ]", ""
DelayFor (10000)
Window SetContext, "Name=FrmSecumodifyuserpw;VisualText=ÐÞ¸ÄÓû§¿ÚÁî", ""
EditBox Click, "Name=txtUserPW1", "Coords=9,5"
InputKeys "^v"
EditBox Left_Drag, "Name=txtUserPW1", "Coords=79,3,-135,7"
InputKeys "welcome"
EditBox Left_Drag, "Name=txtUserPW1", "Coords=41,5,-63,3"
InputKeys "^c"
EditBox Click, "Name=txtUserPW2", "Coords=69,3"
InputKeys "^v"
PushButton Click, "Name=cmdCancel;VisualText=È¡Ïû(&C)"
Window SetContext, "Name=frmMain;VisualText=ÔÆÄÏÁªÍ¨CDMA×ÛºÏÍø¹Üϵͳ£­ÍøÂç¼à¿Ø×Óϵͳ - [ÐÅÁî×é֯ͼ]", ""
GenericObject Click, "Text=DockTop", "Coords=1019,11"
Window CloseWin, "", ""
Window SetContext, "Caption=Òƶ¯ÍøÍø¹Üϵͳ", ""
PushButton Click, "Text=ÊÇ(Y)"
End Sub 是你的C:\Program Files\MetarNet\CUNICOM\ÍøÂç¼à¿Ø×Óϵͳ.exe这个程序,不是你的脚本 多谢版主了, 还有我想测试主菜单,可插入验证点“MENU”后,拖动小手到菜单处,无论怎样重复,都提示没有捕捉到对象。不知道为什么?我用同样方法测试Office 也不行,但Acrobat5.0,画图和笔记本都可以! 上传附件时点击按钮后,会弹出窗口,但是在回放时无法识别!提示 "unexcepted active window"
请高手指教!!!
页:
[1]