Documentos de Académico
Documentos de Profesional
Documentos de Cultura
0 will work with Windows7 and the patch details are given below Change Request: QC82264 This patch enables you to install and use QuickTest 10.00 on Windows 7 and Windows Server 2008 R2 operating systems. However: 1. Windows 7 and Windows Server 2008 R2 do not support the Windows API test recognition mechanism. Therefore, when you install this patch, the 'Use text recognition mechanisms in this order' option in the Options dialog box (Tools > Options > Text Recognition) is set to 'Use only OCR', and cannot be changed (the option is disabled). 2. To support seat licenses on Windows 7, you must run instdemo.exe from QuickTest's bin directory after installing this patch. (Seat licenses are not supported on Windows Server operating systems.) 3. If you want to test WPF objects, you must also add the following line to the [MicIPC] section of the <WinDir>\mercury.ini file. conhost.exe=0 QTP 10.0 offers additional add-ins for Java, .Net, Oracle, Deplhi, Siebel, Peoplesoft, SAP.
DeviceReplay Object
The function below uses the DeviceReplay object to perform a right-click operation on any object by retrieving the coordinates of the object. Sub RightClickObj(Obj, Offset_x, Offset_y) x_coord = Obj.GetROProperty("abs_x") y_coord = Obj.GetROProperty("abs_y") Set dr = CreateObject("Mercury.DeviceReplay") dr.MouseClick x_coord + Offset_x, y_coord + Offset_y, 2 End Sub -------------------------------------------------------------------------------------------------------
VBScript to Clear Browsing History ************************** To Clear Browsing History WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1" ------------------------------------------------------------------------------------------------------BlockInput Feature QTP provides BlockInput method to prevent keyboard and mouse input events from reaching applications. UnblockInput method re-enables keyboard and mouse input events after a BlockInput statement was used to block them. Here is an example. Test it out! SystemUtil.BlockInput Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "mercury" Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "4082986e39ea469e70dbf8c5a29429fe138c6efc" Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("SignIn").Click 2, 2 SystemUtil.UnblockInput ------------------------------------------------------------------------------------------------------Difference between Class Name, micClass, micclass, className When looking through the object spy on any object, we'll see the test-object property "Class Name", which always equals to the QTP-Type of that object. So for example, the Class Name of a browser is "Browser", the Class Name of a WinButton is "WinButton". If you wish to use the "Class Name" property to identify objects with Descriptive Programming syntax, you'd have to use the property micclass. So for example, this won't work: Browser("Class Name:=Browser") But this will: Browser("micclass:=Browser") So, this takes care of Class Name and micclass, what about the plain old Class and className properties? These properties are usually unique to Web objects.
className is a Run-Time object property of Web objects. You can test it yourself: build a symple HTML file, and add to one of the HTML nodes. When you'll load that HTML file in a browser, and use the object spy on the relevant web-object, you'll see className="Something" in the Run-Time tab of the object spy. class is simply the Test-Object property which equals the Run-Time property of className. Meaning that oWebObject.GetROProperty("class") will be the same as oWebObject.Object.className. They represent the same inner data, once through the Run-Time world, and once through the Test-Object world. ------------------------------------------------------------------------------------------------------How to read XML file from QTP? I'm going to show how to parse XML file and read its values from QTP. http://germantechie.com/automation-testing/82-using-xmldom-with-qtp 1. http://go-gaga-over-testing.blogspot.in/2012/04/vapi-script-to-kill-qtp-process.html