Software Testing Social Network

Free Software Testing Tutorial and Quality Assurance Portal

Home My Page Swarup

About Me

Basic Information

Contact Information

Education

Friends

0 friends
Swarup
Swarup
  • Karma
  • Member since
  • Friday, 30 May 2008 01:14
  • Last online
  • 1016 days ago
  • Profile views
  • 6061 views
33 months ago
Swarup created a blog entry QTP Descriptive Prog...

I'm going to explain and show QTP Descriptive Programming (DP) through Google Sets site:

 

The goal of the present QTP tutorial is to describe:

How to get number of controls (Links, Edits, Images, etc) with QTP DP.

 

 

Let's investigate Descriptive Programming on examples.

First of all, we should understand what Descriptive Programming means:

What is QuickTest Professional Descriptive Programming (QTP DP)?

 

Answer: QTP DP is a run-time processing of objects which are not located in QTP Object Repository.

 

 

I've created new QTP script which starts with http://labs.google.com/sets page.

This QTP script is simple enough:

Set Desc = Description.Create()

Desc("micClass").Value = "WebEdit"

Set Links = Browser("Google Sets").Page("Google Sets").ChildObjects(Desc)

 

MsgBox "Number of Edits: " & Links.Count

And its result is:

As you can see, it works correctly and returns correct number of Edits on a page.

I'm going to explain this QTP script and answer the following question:

Aug 10
Swarup created a blog entry How to get number of...

I created the following simple VBScript for QuickTest Professional to extract number of pages in PDF file:

' Function GetNumPagesInPDF returns the number of pages in PDF file

' FileName - path to given ODF file

' If a file isn't found, then -1 will be returned

Function GetNumPagesInPDF(FileName)

    Dim oPDFDoc

    Set oPDFDoc = CreateObject( "AcroExch.PDDoc" )

 

    If oPDFDoc.Open( FileName ) Then

        GetNumPagesInPDF = oPDFDoc.GetNumPages()

        Set oPDFDoc = Nothing

    Else

        GetNumPagesInPDF = -1

    End If

End Function

Aug 10
Swarup created a blog entry QTP Programs...

Hi

Aug 10

JomComment

No comment made yet.

hwdVideoShare

This user has not uploaded any videos.