wei_mengxin 发表于 2005-12-27 12:29:37

求助:回放结果总是提示Unexpected Active Windows falure!如何解决?

求助:在GUI Playback Option中设置如下图:

按设置应该跳过这个Unexpected Active Windows继续执行,可还是出现
回放结果提示Unexpected Active Windows falure!请版主,高手指教,如何解决?

ilovejolly 发表于 2005-12-27 13:56:37

首先你要搞清楚这个window是怎么样出现的,你当前脚本执行的window对象是否还在

wei_mengxin 发表于 2005-12-27 14:32:33

回放时,正常启动应用程序后,就停止了。而在记录脚本时,此时我的操作是点击主菜单中一个子菜单!

ilovejolly 发表于 2005-12-27 14:51:08

如果说你的脚本是要去选一个子菜单然后跳到另外一个页面,而回放的时候没有达到这个目的,那是你脚本有问题

wei_mengxin 发表于 2005-12-27 16:52:33

点击主菜单中的那个子菜单后,应该弹出一个对话框!请版主指教:代码如下


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", ""
乱码部分为双字节!

ilovejolly 发表于 2005-12-27 17:01:30

你看下脚本到哪句就不执行了

wei_mengxin 发表于 2005-12-27 17:06:54

到      Window SetContext, "Class=ThunderForm", ""这行就不行了!

ilovejolly 发表于 2005-12-27 17:22:00

你把你的程序传上来吧

wei_mengxin 发表于 2005-12-27 18:56:42

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

ilovejolly 发表于 2005-12-28 09:22:08

是你的C:\Program Files\MetarNet\CUNICOM\ÍøÂç¼à¿Ø×Óϵͳ.exe这个程序,不是你的脚本

wei_mengxin 发表于 2005-12-28 12:50:14

多谢版主了, 还有我想测试主菜单,可插入验证点“MENU”后,拖动小手到菜单处,无论怎样重复,都提示没有捕捉到对象。不知道为什么?我用同样方法测试Office 也不行,但Acrobat5.0,画图和笔记本都可以!

bb64844866 发表于 2007-3-16 12:03:09

上传附件时点击按钮后,会弹出窗口,但是在回放时无法识别!提示 "unexcepted active window"
请高手指教!!!
页: [1]
查看完整版本: 求助:回放结果总是提示Unexpected Active Windows falure!如何解决?