QTP

QTP Web extensibilty toolkit and ajax

回眸只為那壹抹淺笑 提交于 2019-12-22 07:59:57
问题 I'm trying to test using QTP a web app that is using ajax4jsf to implement the ajax features. QTP doesn't have the ability to recognize when the ajax had finished. I've read that the web extensibility toolkit that is provided with QTP 9.5 and QTP 10 is the solution for my problem. However, I can't understand how this can help me: I need to know the ready state of the httpRequest object and continue the test when the state is 'complete'. But I don't know how to reach the httpRequest from the

How to Zoom in or Zoom out in a webpage while using UFT/QTP

為{幸葍}努か 提交于 2019-12-21 06:04:13
问题 I would like to control the zoom in and out feature of my webpage of the application under test using UFT. This is required as the zoom level changes dynamically and it becomes difficult to identify the objects. I have found a code but it is useful if you need to change the zoom level at one instance or at the start. below is the code Function ChangeIEZoom Dim intZoomLevel, objIE intZoomLevel = 110 Const OLECMDID_OPTICAL_ZOOM = 63 Const OLECMDEXECOPT_DONTPROMPTUSER = 2 Set objIE =

QTP: How can I return multiple Values from a Function

倾然丶 夕夏残阳落幕 提交于 2019-12-21 04:04:58
问题 I'm trying to write a function which can return multiple values from a Function which is having 2 arguments. eg: function sample_function(arg1,arg2) ''#Some code................. passenger = list1(0) name1 = list1(1) age1 = list1(2) seatNumber = list1(3) ''#This is an Incomplete function... end function sample_function Here this function named sample_function has 2 argument named arg1, arg2. When i call this function in my Driver Script like value = sample_function(2,Name_person), this

How to import data file for UFT API testing?

柔情痞子 提交于 2019-12-20 05:11:37
问题 I am working on a project which requires to dynamically import the test data on run time and run the API test corresponding to the test data. I tried using XMLload which I directly load from the xml request. This seems to be working fine. But like GUI testing, where we import the test data, I want the same for API testing - where I can import a excel from an external source dynamically and give the values to the request. How can I do this? 回答1: As far as I understand your question, you want

QTP/UFT - Close all browsers except QC/ALM

那年仲夏 提交于 2019-12-20 04:45:14
问题 Currently I am using the below code to close all the browsers except the ALM browser from where I run the test suite from. However When I run the suite from ALM, the below code identifies 2 browsers - ALM browser and the test case browser. It first closes the test case browser and when it executes the iteration for the ALM browser, it says the browser is not identified when it tries to find the name of the browser. I am not sure why it counts it as a browser if it cant identify it later. Any

Debugging into C# code from other application

核能气质少年 提交于 2019-12-20 04:11:25
问题 I'm loading a dll (c#) from QTP. Is it possible to debug the c# code when the qtp test starts. 回答1: Yes you can debug into the dll's you can, but you will need source (unless you want to look at the disassembly) and you will also need the PDBs (debug symbols) for the assembly. It is pretty easy to setup... start the QTP application start visual studio open the source code and make sure the pdb's are in the same directory as the dll in VS go to the debug menu and select attach to process In

Retrieve only numbers and ignore alphabets from String

♀尐吖头ヾ 提交于 2019-12-20 03:07:22
问题 I have strings like 10A or 20B. I want 10 in 10A or 20 in 20B. How to split only numbers from string using VBScript or QTP internal commands? 回答1: I would use a regular expression: s = "20B" Set re = New RegExp re.Pattern = "^\d+" For Each m In re.Execute(s) num = CInt(m) Next WScript.Echo num 来源: https://stackoverflow.com/questions/39601885/retrieve-only-numbers-and-ignore-alphabets-from-string

What is descriptive programming (Programmatic Description) in QTP

本秂侑毒 提交于 2019-12-19 09:57:57
问题 What is descriptive programming in QTP? 回答1: Creating a test without using the object repository is known as descriptive programming since you describe the objects as part of the script. e.g. Browser("title:=Google").Page("title:=Google").Link("text:=Advanced Search").Click Note the := in the test objects' names, this is not a smiley it means that the property title has value Google (as a regular expression). You can also use the Description object via Description.Create . You can see more

How does UFT perform the Click method when using the Web Add In?

回眸只為那壹抹淺笑 提交于 2019-12-19 09:38:41
问题 I am testing a highly javascript based application on Internet Explorer 8.0 with UFT 11.50. I would like to know how UFT implements the "Click" method under the hood when using the Web Add In. Does UFT send a windows mouse event? Does it fire an event (onclick, onmousedown, onmouseup)? I have been seeing some mixed results with my application. 回答1: It can do either, by default UFT replays using DOM events but you can change the replay type to device in which case it queries the HTML element's

Execution of QTP scripts on remote machines

爱⌒轻易说出口 提交于 2019-12-19 04:24:20
问题 I am posting this question regarding the execution of QTP scripts on remote machine. When i log in to my remote machine via "mstsc", and execute the script without closing the remote desktop connection, it works fine. But once i close/minimize the remote desktop window, it starts throwing error ( like Object not visible" error. One of the places where it generally throws error is while clicking on the file menu in IE, as shown below :- Browser(" page name -").WinToolbar("ToolbarWindow32")