UFT在一些播放不识别窗口 [英] UFT not identifying a window in some playback

查看:1243
本文介绍了UFT在一些播放不识别窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用UFT描述节目。在播放过程中,我要检查如果Windows打印对话框确实出现。然后我想单击该对话框中的取消按钮。
我的问题:偶尔QTP无法识别的打印对话框,所以点击取消按钮失败。
这怎么可能有时会失败,有时会成功吗?

下面

我的code语法给出:

 设置Window_EnterMeter = browser_servicemanager.Window(regexpwndtitle:=输入*米)
设置dialog_Print = Window_EnterMeter.Dialog(regexpwndtitle:=打印)
设置winbtn_CalcelPrint = dialog_Print.WinButton(regexpwndtitle:=取消)FN chckprintpopupwndow()
{''''''''浏览该页面
          调用Absolutehighlight(BUTTON_ACTION)
          调用Absolutehighlight(Meter_Entry)
          调用Absolutehighlight(PrintMeter_Opt2)
          AbsoluteClick(PrintMeter_Opt2)
          EnterMeters_Window.WebElement(HTML ID:= ctl00_Save_BTN_C)点击。'''''''通过点击abve选项窗口弹出打印选项出现,UFT不能识别窗口中的所有时间,所以点击取消不这样做按钮,TC失败
          dialog_Print.Activate
          AbsoluteClick(winbtn_CalcelPrint)
          EnterMeters_Window.WebElement(HTML ID:= ctl00_Cancel_BTN_C)点击。
}


解决方案

我发现这个问题的根本原因,其实正在运行的虚拟机(VM)整个脚本。在播放一些我尽量减少虚拟机并在本地系统上工作,所以尽量减少在UFT未能检测到winobject,也不会有工作(发送键)任意键preSS以最小化模式的事件。我们可以通过更新注册表编辑解决最小化问题。有关详细信息,请访问: -
<一href=\"http://stackoverflow.com/questions/3215543/can-we-execute-qtp-script-on-remote-machine-by-keeping-session-minimized/13370827#13370827\">can我们通过保持最小化会议远程机器上执行QTP脚本

I am using descriptive programming in UFT. During playback, I want to check if the Windows print dialog does appear. Then I want to click the Cancel button in that dialog. My problem: Sporadically QTP fails to identify the printing dialog, so clicking on the cancel button fails. How can this possibly sometimes fail, sometimes succeed?

My code syntax given below:

Set Window_EnterMeter = browser_servicemanager.Window("regexpwndtitle:=Enter Meters.*") 
Set dialog_Print = Window_EnterMeter.Dialog("regexpwndtitle:=Print") 
Set winbtn_CalcelPrint = dialog_Print.WinButton("regexpwndtitle:=Cancel") 

fn chckprintpopupwndow() 
{ ''''''''Navigating to that page 
          call Absolutehighlight(Button_Action) 
          call Absolutehighlight(Meter_Entry) 
          call Absolutehighlight(PrintMeter_Opt2) 
          AbsoluteClick(PrintMeter_Opt2) 
          EnterMeters_Window.WebElement("html id:=ctl00_Save_BTN_C").Click 

'''''''By click on abve option window popup print option appears and UFT not identifying that window all times, so clicking on cancel button not doing so TC fails 
          dialog_Print.Activate 
          AbsoluteClick(winbtn_CalcelPrint) 
          EnterMeters_Window.WebElement("html id:=ctl00_Cancel_BTN_C").Click 
} 

解决方案

I found out the root cause of this problem, Actually am running the whole script in a Virtual Machine(VM). During some playback i minimize the VM and work on local system, so during minimizing UFT fails to detect the winobject and also there wont work the (send keys) any keypress events in minimized mode. We can solve the minimize issue by updating the registry edit. For more details go to:- can we execute QTP script on remote machine by keeping session minimized

这篇关于UFT在一些播放不识别窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆