FAQ Database Discussion Community


Unable to read a TSR Object repository using RepositoryUtil.dll in C#

c#,qtp
I am pretty new to C# and .net. and I have been tasked with creating a WPF application POC to read a QTP object repository in a .tsr file and populate a TreeView with all the objects in that repository and their child objects. I was provided with QTP's RepositoryUtil.dll...

Get dates from AUT?

date,vbscript,locale,qtp,hp-uft
My Web-based application (like most) follows the browser locale to format dates. So if you configure British English as the preferred language in the browser, the app will display dates in "DD/MM/YYYY" format. Now QTP (ok, it´s VBScript that is the culprit) does not know about this. It strictly follows...

How to test the functionality of page scroll using QTP?

qtp,hp-uft
I am automating a web application and in one of the page contains lengthy content, so user need to use the scrollbar to read through the whole content. Now at the top of the page there is a link available named as "Bottom", on clicking this link user will go...

UFT error: Cannot identify the object

object,vbscript,qtp,hp-uft
I'm using Unified Functional Testing v12.02 (or QTP). Sometimes while running script i get the below error and sometimes I don't. Cannot identify the object "..." (of class ...) Verify that this object's properties match an object currently displayed in your application. Tip: If the objects in your application have...

Xpath for two different attributes in 2 different tags

html,xpath,qtp
HTML Snippet: <TH class="abcd" style="WIDTH: 70%">03 Mar 2014</TH> <TH style="WIDTH: 58%" height=18>27 Feb 2014</TH> <TH class="abcd" style="WIDTH: 70%">03 Jun 2014</TH> <TH style="WIDTH: 58%" height=18>12 Jun 2014</TH> Description: We need to retrieve dates from the above HTML snippet. All the dates are present in either of the two tags and need...

Calling GUITest from APITest in HP-UFT

web-services,qtp,hp-uft
We have scenario like passing soap request with session ID which can be generated by another IE session. Every time we create new session ID manually from that IE session and feed it in SOAP request and invoke the service. Recently we started using HP-UFT for API and GUI testing....

I am looking for QTP containing inputbox kind of method in java

java,qtp
I am new to the java,I have experience in QTP. In the QTP we have inputbox built-in function. so at runtime while developing program we can give input value using inputbox function. So, I am looking for similar method in the java.Can you please help me any built in method...

Function keys In UFT

automation,ui-automation,qtp,hp-uft
Version : Using HP-UFT Tool 11.53 Build 0382. Question :Wanted to automate Function key F9 for my script but I am not able to as I do for normal keyboard keys what is method to do so. Work Done : Try to Record for function key Hitting But no...

programmatically add object to qtp local repository

qtp
I am working on Visual Relation Identifier (VRI) QTP,it's working fine when i add the source object (see the code) in the object repository.But, in QTP help file it is mentioned that: "The specified object must be an object from the test object repository. It cannot be a test object...

Record without adding to repository?

vbscript,qtp,hp-uft
Imagine creating a new QTP project. You hit record to get your first bit of code in place. By default, you'll get something like: Browser("MyApp").Page("MyPage").WebEdit("MyLogin").Set "Bob" And you'll get the Browser, Page, and WebEdit objects automatically added to the repository. What I would like to be able to do, as...

How to identify a dynamically changing html id using QTP/UFT

vbscript,qtp,hp-uft
There is a text field on the page that I would like QTP to enter amount for me. The HTML ID of the field has a dynamic name gh44jer4u.Amount but ends with a word amount. How can I refer to that? Can I use Contains or Ends with inside html...

Unable to uncheck image checkbox using qtp

qtp
I have a webtable which has a column of image checkboxes, one for each row. They are all checked and I want to uncheck them. I have pasted the properties of one of the image checkbox below Class Name = Image, abs_x=275, abs_y=374, alt=Checked, class=, file name=ig_checkbox_on.gif, html id=x:593231214.20:chkState:1, html...

How to identify the class of an Object which is in a cell of webtable

object,table,web,qtp
I have a webtable which MIGHT have a weblink object in it's Row 2, Column 1 cell (also Index of this object is 0). If it indeed is a link I would like to click it else ignore it. Is there a way to identify the class of this object...

QTP: How to copy file from onle location and paste it into another and verify file count at the end

vbscript,qtp,hp-uft
I need to write a vbscript for Copying files from local directory(Windows) to another(shared drive) and verify the counts at the end to make sure everything copied successfully. Any ideas on what the script will look like? Here is what I recorded using GUI UFT: SystemUtil.Run "C:\Users\Downloads" Window("Documents").WinObject("Items View").WinList("Items View").Activate...

playback video recording at UFT

qtp,video-recording,hp-uft
I'm using HP UFT 12.02 automation testing tool, and I'd like to know whether it is possible to record a video for the recorded script during the playback, along with screenshots for the verification points? If yes, would you please advice the steps?

Unexpected result of StrComp when using vbTextCompare

vba,vbscript,qtp,hp-uft
The goal Compare two strings lexicographically, ignoring case. Possible solutions using StrComp Consider the following script: val1 = "test9999" val2 = "TEST_59895" LexCompare val1, val2, vbBinaryCompare LexCompare LCase(val1), LCase(val2), vbBinaryCompare LexCompare UCase(val1), UCase(val2), vbBinaryCompare LexCompare val1, val2, vbTextCompare LexCompare LCase(val1), LCase(val2), vbTextCompare LexCompare UCase(val1), UCase(val2), vbTextCompare WScript.Echo "ANSI values: '9'="...

GetObject is crashing UFT

qtp,hp-uft
I am using UFT 11.53 with all the necessary patches installed. I have a function called MinimizeQTP which contains the following code. Set objQTP = GetObject("","Quicktest.Application") objQTP.Minimize As soon as the control comes to the GetObject line QTP crashes. Has anyone seen this problem before and could you advise what...

QTP - Clicking on a button with a given value

testing,web,qtp
I've started using QTP last weekend so I'm still a bit confused about some things. I've coded a function that opens an URL on IE, performs some actions and writes a report. But I have a little problem: at a certain point the function has to click on a...

QTP - Getting a button value

button,testing,automated-tests,qtp,utf
I have a portion of code where I pick the value in a button and use it for other purposes. Or, at least, this is what I'd like to do. The button changes value at every refresh of the page (it's a webpage). For example: at the first access...

How do we reference an already opened instance of quick test?

vbscript,qtp
How do we reference an already opened instance of quick test application (QTP) for e.g we will use Set monDocument = GetObject("c:\report.doc") to refer an already opened MS Word file saved in c:\report.doc?

Can we write class inside VBScript function?

vbscript,qtp
Function CWSLogin(strApplicationPath,strUser,strMember,strPassword) Class TryCatchFinally Private Sub Class_Initialize 'Try End Sub End Class End Function ...

QTP AOM Model Intellience Not Working

vbscript,com,automation,qtp
I want to use QTP AOM(Automation Object Model) using vbscript. I use VbsEdit to develop this script but I did not get any intellience from this editor even I also try this from excel developer window. There also intellence assistance is not available. I need this because if it is...

Using regex in QTP to match diff URL

regex,qtp
I am running same QTP script in QA and Staging environment. One test case requires me to click on a PDF document which opens in a new window. My situation is that the even though the document is the same the domain name is different. What do I do to...

Unable to identify an object using QTP which is removed from UI once action is done on it

qtp
I have a situation here. The application that I am automating is a JavaScript app with a .NET wrapper. One of the web tables has the functionality where in after selecting and doing an action on a row, this row is removed from the table and no longer in the...

Value of WEBEDIT object during recording, is not stored in OR in QTP

qtp
I want to know how to store value entered in a webedit box duting recording, in object repository. I entered value 'XY' in google search box. It showed up as Code: Browser("Google").Page("Google").WebEdit("q").Set "XY" However, in OR property "value" is blank. On other hand, if I manually add this WebEdit object...

UFT .Net Extensibility: How to pass Scripting.Dictionary to C# method?

c#,.net,vbscript,qtp,hp-uft
I'm implementing .Net Extensibility for custom object for UFT 12. I have to pass Scripting.Dictionary from UFT to Extensibility and return it back to UFT. This is example of extensibility usage: Dim dictFilter Set dictFilter = CreateObject("Scripting.Dictionary") dictFilter.Add "Key", "Value" dictFilter.Add "Key1", "Value1" Dim resultFilter Set resultFilter = SwfWindow("Selection").SwfTable("obj").MyMethod(dictFilter) This...

QTP - Controlling if a date is later than another one

string,date,testing,qtp
Hello everyone! I'm writing a lot of scripts these days at work but now I'm stuck... Basically I need to analyze a parameter (a String) and see if the date it contains is later than another one... I know it could be a "nooby" question, but the fact that...

Changing UFT working directory

qtp,hp-uft
I recently had a situation where the application under test was not installed in Program Files or Program Files (x86). When I launched that application from UFT it complained about not being able to find a ddl file and in the error trace it seemed to be looking for that...