最新QTP识别flex4方法研究

 QTP测试flex3和flex2 的方法,网上提供了很多的说明和讲解,但是针对最新的flex4,网上基本上时没有相关的资料的。好的东西当然要第一时间使用了,一时兴奋,从adobe官网下载了flashbuilder4_b1_win_060109,这个版本很好,还提供了中文的支持,用起来很是舒服。但是针对QTP如何来测试flex4呢,方法还是一样吗。今天特意抽了一天的时间来试验。新的东西就是有一点不好,资料太少,可参考的东西太少。无奈之下,只好到adobe官网找东西了,终于还是不负有心人。现在我将QTP测试flex4的方法各项给大家。整体来说还是改变了很多东西,adobe公司这次还提供了2个插件:air和flex,大家要好好研究一下了。 (插件我已上传,提供下载)

  最新QTP识别flex4方法研究

  Flex4:

  准备:

  1. 下载并安装Flex Builder 4(安装后界面打开如上图)

  2. IE 6 或以上(目前只支持IE)

  3. Flash Player ActiveX control, version 9.0.28.0或以上,最新10.0

  4. QTP 9.5或 QTP 9.2 或QTP10

  安装:

  5. 安装QTP的插件,这次adobe公司没有在flashbuilder4_b1_win_060109安装包内提供相应的QTP插件,我也是找了n长的时间,我认为flex4和flex3应该基本上一样,但是结果却很失望。没办法还得到官网,找了n长时间,终于找到了以下的flex4的QTP插件,兴奋呀。

  本文出自yiran3235的51Testing软件测试博客:http://www.51testing.com/?125734

  6. 这次adobe公司提供了两个插件,:运行Install_QTP_Plugin.bat文件(插件提供两个:air和flex)。插件见附件flex4,大家可以进行下载。针对两个不同的插件,我们新建2个不同的工程进行分别的讲述:flex和air。(QTP插件安装后如下图:)

  最新QTP识别flex4方法研究

  Flex项目编译:

  7. 必须用Flex Builder 4 编译Flex项目, 而不能仅仅用Flex 4 SDK编译,因为Flex Builder中带了一些的特殊的包。

  1)打开FB,,新建一个flex项目,项目名:flex,切忌此时要选择应用程序类型为:web

  最新QTP识别flex4方法研究

  2)在项目名flex右键选择你的Project -> Properties -> Flex 编译器

  3) 修改属性“附加的编译器自变量”,在该属性中添加如下代码:

  -include-libraries "D:/Program Files/Adobe/Flash Builder Beta/sdks/4.0.0/frameworks/libs/automation/automation.swc" "D:/Program Files/Adobe/Flash Builder Beta/sdks/4.0.0/frameworks/libs/automation/automation_agent.swc" "D:/Program Files/Adobe/Flash Builder Beta/sdks/4.0.0/frameworks/libs/automation/qtp.swc" "D:/Program Files/Adobe/Flash Builder Beta/sdks/4.0.0/frameworks/libs/automation/automation_dmv.swc" 其中要注意修改安装目录。

  4)打开D:/Program Files/Adobe/Flash Builder Beta/sdks/4.0.0/templates/automation-runtimeloading-files ,运行build.bat文件

  本文出自yiran3235的51Testing软件测试博客:http://www.51testing.com/?125734

  5)同样,在该文件夹下,点击右键编辑runtimeloading.mxml文件,将其中的内容拷贝下来,粘贴到你的flex项目的project.mxml中(也就是我们新建的项目flex.mxml)。这是和flex3最大的差别,如下图所示:

  最新QTP识别flex4方法研究

  6)此时我们添加一个按钮test,编译该工程,如下图所示。

  7)运行编译你的代码,这个时候QTP即可识别你的操作。我们可以很清楚的看见QTP对象识别的结果,如下图:

  最新QTP识别flex4方法研究

  哈哈,这个时候我们的辛苦终于ok了。Flex3和flex4最大的差别就是需要runtimeloading.mxml,大家千万注意。

  内容导航

  air项目编译(和flex基本上差不多,我只讲诉不同地方):

  1)打开FB,新建一个flex项目,项目名:air,切忌此时要选择应用程序类型为:air

  2)修改属性“附加的编译器自变量”,在该属性中添加如下代码:

  -include-libraries "flash_builder_root/sdks/4.0.0/frameworks/libs/automation/automation.swc" "flash_builder_root/sdks/4.0.0/frameworks/libs/automation/automation_agent.swc" "flash_builder_root/sdks/4.0.0/frameworks/libs/automation/qtp_air.swc" "flash_builder_root/sdks/4.0.0/frameworks/libs/automation/automation_dmv.swc" "flash_builder_root/sdks/4.0.0/frameworks/libs/automation/automation_air.swc" 其中要注意修改安装目录。

  3)编译你的代码,QTP即可识别。

  http://labs.adobe.com/wiki/index.php/Flash_Builder_4:Release_Notes#Flex_4_Plug-in_for_HP_QuickTest_Professional(官方地址)

  关于flex3的方法比较充实,以下是方法,供大家查看。

  Flex3的对象识别方法:

  1)Flex Builder 3. 到这个地方 https://www.adobe.com/cfusion/td …… us&product=flex (需要注册)下载 Adobe Flex Builder 3 Professional 或者Flex Builder 3 Professional Eclipse Plug-in (如果本机已有eclipse)。其中Flex Builder 3中已经包含QTP的plugin

  2)IE 6 或以上(目前只支持IE)

  3)Flash Player ActiveX control, version 9.0.28.0或以上,最新9.0.115.0 (检查C:/WINDOWS/system32/Macromed/Flash/FlashUtil9e.exe的属性可以查看当前安装flash的版本)

  4)QTP 9.1(不支持Smart Identification)或 QTP 9.2 和 patch 1701

  编译:

  必须用Flex Builder 3 编译Flex项目, 而不能仅仅用Flex 3 SDK编译,因为Flex Builder中带了一些的特殊的包

  1)打开FB,右键选择你的Project -> Properties -> Flex Compiler

  2)修改属性“Additional compiler arguments”,在该属性中添加如下代码:

  -include-libraries"flex_builder_dir/sdks/3.0.0/frameworks/libs/automation.swc" "flex_builder_dir/sdks/3.0.0/frameworks/libs/automation_agent.swc" "flex_builder_dir/sdks/3.0.0/frameworks/libs/qtp.swc" "flex_builder_dir/sdks/3.0.0/frameworks/libs/automation_dmv.swc"

  其中flex_builder_dir由Flex Builder的安装目录代替,windows平台的默认安装目录为 "C:/Program Files/Adobe/Flex Builder 3"

  3)编译项目,然后发布应用到你的web server中

  4)这时就为QA的自动化测试做好了准备

  QTP插件安装:

  1)运行flex_builder_dir/Installers/QTP_Plugin_Installer.exe

  2)验证plugin是否安装好:启动QTP,在Add-ins Manager窗口中出现Flex 3.0.0

附件:

Flex3.rar

Flex4.rar

Building on: linux-g++ (x86_64, CPU features: mmx sse sse2) Building for: linux-aarch64-gnu-g++ (arm64, CPU features: neon) Target compiler: gcc 6.3.1 Configuration: cross_compile use_gold_linker compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 concurrent dbus reduce_exports stl Build options: Mode ................................... release Optimize release build for size ........ no Building shared libraries .............. yes Using C standard ....................... C11 Using C++ standard ..................... C++14 Using ccache ........................... no Using gold linker ...................... yes Using new DTAGS ........................ yes Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: NEON ................................. yes Build parts ............................ libs Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... no Qt Gui ................................. yes Qt Network ............................. yes Qt Sql ................................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... yes udev ................................... no Using system zlib ...................... yes Qt Core: DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... no iconv .................................. yes ICU .................................... no Tracing backend ........................ Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no Using system PCRE2 ..................... no Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... yes OpenSSL ................................ yes Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ no DTLS ................................... yes SCTP ................................... no Use system proxies ..................... yes Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ no HarfBuzz ............................... yes Using system HarfBuzz ................ no Fontconfig ............................. no Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... yes PNG .................................. yes Using system libpng ................ no EGL .................................... no OpenVG ................................. no OpenGL: Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no Vulkan ................................. no Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... no INTEGRITY HID .......................... no mtdev .................................. no tslib .................................. no xkbcommon .............................. no X11 specific: XLib ................................. no EGL on X11 ........................... no QPA backends: DirectFB ............................... no EGLFS .................................. no LinuxFB ................................ yes VNC .................................... yes Mir client ............................. no Qt Sql: SQL item models ........................ yes Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows Qt PrintSupport: CUPS ................................... no Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. no SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt Testlib: Tester for item models ................. yes Qt SerialBus: Socket CAN ............................. yes Socket CAN FD .......................... yes Qt QML: QML network support .................... yes QML debugging and profiling support .... yes QML sequence object .................... yes QML list model ......................... yes QML XML http request ................... yes QML Locale ............................. yes QML delegate model ..................... yes Qt Quick: Direct3D 12 ............................ no AnimatedImage item ..................... yes Canvas item ............................ yes Support for Qt Quick Designer .......... yes Flipable item .......................... yes GridView item .......................... yes ListView item .......................... yes TableView item ......................... yes Path support ........................... yes PathView item .......................... yes Positioner items ....................... yes Repeater item .......................... yes ShaderEffect item ...................... yes Sprite item ............................ yes Qt Scxml: ECMAScript data model for QtScxml ...... yes Qt Gamepad: SDL2 ................................... no Qt 3D: Assimp ................................. yes System Assimp .......................... no Output Qt3D Job traces ................. no Output Qt3D GL traces .................. no Use SSE2 instructions .................. no Use AVX2 instructions .................. no Aspects: Render aspect ........................ yes Input aspect ......................... yes Logic aspect ......................... yes Animation aspect ..................... yes Extras aspect ........................ yes Qt 3D Renderers: OpenGL Renderer ........................ yes Qt 3D GeometryLoaders: Autodesk FBX ........................... no Qt Wayland Client ........................ no Qt Wayland Compositor .................... no Qt Bluetooth: BlueZ .................................. no BlueZ Low Energy ....................... no Linux Crypto API ....................... no WinRT Bluetooth API (desktop & UWP) .... no Qt Sensors: sensorfw ............................... no Qt Quick Controls 2: Styles ................................. Default Fusion Imagine Material Universal Qt Quick Templates 2: Hover support .......................... yes Multi-touch support .................... yes Qt Positioning: Gypsy GPS Daemon ....................... no WinRT Geolocation API .................. no Qt Location: Qt.labs.location experimental QML plugin . yes Geoservice plugins: OpenStreetMap ........................ yes HERE ................................. yes Esri ................................. yes Mapbox ............................... yes MapboxGL ............................. no Itemsoverlay ......................... yes QtXmlPatterns: XML schema support ..................... yes Qt Multimedia: ALSA ................................... no GStreamer 1.0 .......................... no GStreamer 0.10 ......................... no Video for Linux ........................ yes OpenAL ................................. no PulseAudio ............................. no Resource Policy (libresourceqt5) ....... no Windows Audio Services ................. no DirectShow ............................. no Windows Media Foundation ............... no Qt Tools: QDoc ................................... no Qt WebEngine: Embedded build ......................... yes Pepper Plugins ......................... no Printing and PDF ....................... no Proprietary Codecs ..................... no Spellchecker ........................... yes Native Spellchecker .................... no WebRTC ................................. no Use System Ninja ....................... no Geolocation ............................ yes WebChannel support ..................... yes Use v8 snapshot ........................ yes Kerberos Authentication ................ no Building v8 snapshot supported ......... yes Use ALSA ............................... no Use PulseAudio ......................... no Optional system libraries used: re2 .................................. no icu .................................. no libwebp, libwebpmux and libwebpdemux . no opus ................................. no ffmpeg ............................... no libvpx ............................... no snappy ............................... no glib ................................. no zlib ................................. yes minizip .............................. no libevent ............................. no jsoncpp .............................. no protobuf ............................. no libxml2 and libxslt .................. no lcms2 ................................ no png .................................. no JPEG ................................. no harfbuzz ............................. no freetype ............................. no x11 .................................. no Required system libraries: fontconfig ........................... no dbus ................................. no nss .................................. no khr .................................. no glibc ................................ yes Required system libraries for qpa-xcb: libdrm ............................... no xcomposite ........................... no xcursor .............................. no xi ................................... no xrandr ............................... no xtst ................................. no Note: Also available for Linux: linux-clang linux-icc
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值