QTP10.com is a new and completely free website that offers help in all the versions of HP QTP (including latest version 10). More importantly, it offers free code for users of HP QuickTest Professioal. This site helps you in learning the basics of QTP and descriptive/advanced programming in (QTP) on various environments like - .Net, Infragistics, Web, Windows, etc.

Note -
This blog is NOT affiliated with HP / Hewlett-Packard in any way. The data/questions come from various sources and we have our own testing questions. I am just another Software Tester like you.

Friday, June 18, 2010

Some Important point you should know if you are upgrading to QTP 10 or QC 10

Below are some important points you should know if you are upgrading to QTP or QC 10:

 

1. Are your scripts built in QTP 9.2? No need to worry. QTP10 is capable of running QTP 9.2 scripts (through QC or locally) even if they are not upgraded.

Scripts are automatically upgraded when opened once in QTP10.

 

2. Integration with 9.2 versions: QTP10 works well with Quality center 9.2 but Quality Center 10 is not compatible with QTP 9.2.

 

3. Add-ins Installation: The all-in-one install offers all add-ins integrated with core application, Just need to include this single installer on SDS

SPONSORED LINKS

Sunday, May 23, 2010

QTP Environment Variables Simplified

The variables that are commonly used across the environment in many tests by different resources are know as Environment Variables.

There are Two types of Environment variables

1. Built-in-variables

2. User Defined Variables

SPONSORED LINKS

Monday, April 19, 2010

Advanced QTP - DP and Child Objects - Simple Code To Validate All Links of a webpage

‘***********************************************************************
‘SCENARIO NAME :Check all links
‘DESCRIPTION :This code Check all links in any web page
‘PRECONDITIONS :This Assume that when click on Link the new page will open on current window but not in new window
‘AUTHOR :Mohan kumar
‘***********************************************************************

Set oDesc = Description.Create()
‘ Retrieve HTML tag
oDesc(”html tag”).Value = “A”
Set rc = Browser(”title:=.*”).Page(”title:=.*”).ChildObjects(oDesc)
num = rc.Count() ’get the number of link in a page
For i=0 to num-1
Set rc = Browser(”title:=.*”).Page(”title:=.*”).ChildObjects(oDesc)
ref = rc(i).GetROProperty(”href”) ’get the “href”propety of the i th link
Browser(”title:=.*”).Page(”title:=.*”).link(”text:=.*”,”index:=”&i).click ’click on i th link
Browser(”title:=.*”).sync
title1=Browser(”title:=.*”).getRoproperty(”title”) ’get the tile of the target page
MsgBox title1
Browser(”title:=.*”).navigate(ref)’Navigates to the url taken from “href” property
Browser(”title:=.*”).sync
title2=Browser(”title:=.*”).getRoproperty(”title”)’get the tile of the tNavigated page
MsgBox title2
If title1=title2 Then’condition to check for the targetted page and Navigated page
Reporter.ReportEvent 0, “Navigated To Correct Page”,”"&title1′Reports if correct
else
Reporter.ReportEvent 1,”"&title1,”"&title2
End If
Browser(”title:=.*”).back’Navigates back to main page
Browser(”title:=.*”).sync

 

Source-  - http://quicktestprofessional.wordpress.com/about/

SPONSORED LINKS

Count the number of links & Objects in a web page by ChildObjects Method

To count the number of links in a web page, We can use ChildObjects to get the link collection, then retrieve the properties for example number of links or any other objects on page.

 

Dim oDesc, oAllLinks, iNumberOfLinks
set oDesc = Description.Create()
oDesc("micclass").Value = "Link"
Set oAllLinks = Browser("creationtime:=0").
Page("micclass:=Page").ChildObjects(oDesc)
iNumberOfLinks = aAllLinks.Count
msgbox iNumberOfLinks

SPONSORED LINKS