• 18.3.5 测试DevComponents的hScrollBarAdv控件(2)


    18.3.5  测试DevComponents的hScrollBarAdv控件(2)

    Configuration.xml文件的内容如下所示:

    1. <!-- Merge this XML content into file "<QuickTest Professional>dat SwfConfig.xml". --> 
    2.   <Control Type="DevComponents.DotNetBar.ScrollBar.HScrollBarAdv" MappedTo="SwfScrollBar"
    3.     <CustomRecord
    4.       <Component
    5.         <Context>AUT</Context
    6.         <DllName>E: mpQuickTestCustomServer_vScrollBarAdv_hScrollBarAdvQuickTestCustomServer_vScrollBarAdv_hScrollBarAdvBinQuickTestCustomServer_vScrollBarAdv_hScrollBarAdv.dll</DllName
    7.         <TypeName>QuickTestCustomServer_vScrollBarAdv_hScrollBarAdv.ScrollBar</TypeName
    8.       </Component
    9.     </CustomRecord
    10.     <CustomReplay
    11.       <Component
    12.         <Context>AUT</Context
    13.         <DllName>E: mpQuickTestCustomServer_vScrollBarAdv_hScrollBarAdvQuickTestCustomServer_vScrollBarAdv_hScrollBarAdvBinQuickTestCustomServer_vScrollBarAdv_hScrollBarAdv.dll</DllName
    14.         <TypeName>QuickTestCustomServer_vScrollBarAdv_hScrollBarAdv.ScrollBar</TypeName
    15.       </Component
    16.     </CustomReplay
    17. <!--<Settings
    18.        <Parameter Name="sample name">sample value</Parameter
    19.     </Settings> --
    20.   </Control

    在完成了对hScrollBarAdv控件的插件扩展开发并成功部署后,即可在QTP中录制出如下所示的控制hScrollBarAdv控件的脚本:

    1. SwfWindow("Form1").Activate  
    2. SwfWindow("Form1").SwfScrollBar("hScrollBarAdv1").SetValue "44" 

    可见,对hScrollBarAdv控件的拖动可以通过设置精确的位置值来达到,而不是通过鼠标拖拽或者键盘操作,并且支持录制生成脚本。

    http://book.51cto.com/art/201208/352942.htm

  • 相关阅读:
    帆软 控件内容 清除
    Spring MVC 拦截器
    jsp文件调用本地文件的方法(Tomcat server.xml 设置虚拟目录)
    Junit 4 测试中使用定时任务操作
    通过URL传递PDF名称参数显示PDF
    SpringMVC 无法访问到指定jsp页面可能的原因
    优化小技巧——复杂属性对象的read模式
    [as部落首发]网页游戏开发中的一些小技巧
    Flash Platform 游戏开发入门
    理解 Flash 中的 ActionScript 3 调试
  • 原文地址:https://www.cnblogs.com/gdg87813/p/10956365.html
Copyright © 2020-2023  润新知