Results 1 to 3 of 3

Thread: Qtp

  1. #1
    Junior Member
    Join Date
    May 2008
    Answers
    1

    Qtp

    How do we count the links displayed on page using QTp,can we use getrop property,pls do me needful with dis coding part,suppose there ar some 10 links
    we need to count the links and we need to validate.


  2. #2

    Re: Qtp

    You can count the links using the following code:

    Set oLink = Description.Create()
    oLink("micclass").value = "Link"
    oLink("html tag").value = "A"

    Set oLinkCount = Browser("").Page("").ChildObjects(oLink)

    MsgBox oLinkCount


  3. #3

    Re: Qtp

    Set ObjectControl = Browser("Name").Page("Name")

    Dim oDesc
    Set oDesc = Description.Create()
    oDesc("micclass").Value = "Link"'It is nothing but the class name of respective object.
    Set Objects = ObjectControl.ChildObjects(oDesc)
    environment("Objectscount") = Objects.Count'This environment variable holds the number/count of object of specified class in the destination page.


    Cheers!!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact