Answered Questions

  • Count Number of Links

    How to count number of links in a web page using QTP?

    Star Read Best Answer

    Editorial / Best Answer

    calvin_29  

    • Member Since Sep-2010 | Sep 20th, 2010


    This is the script, We should first create an object

    set oDesc=description.create()
    'prefer descriptive programming...batter
    oDesec("micclass").value="link"
    'get all child objects in an variable
    set oLink=browser("name:=.*").page("title:=.*").childobjects(oDesc)
    'count all links
    intC=oLink.count
    'Use print or msgbox or 'reporter.reportevent'
    print intC
    'it glows links in the web page
    for i=0 to intC-1
    oLink(i).highlight
    next
    set oLink=nothing
    set oDesc= nothing

    'Offer me comment if it works properly

    rohan

    • May 22nd, 2015

    By using descriptive programming we can count and displays the number of links in web page Set ObjDesc = Description.Create ObjDesc.Add "micclass","Link" Set ObjBr = Browser("name:=*).Page("title:=...

    yogi

    • Dec 27th, 2014

    Your code doesnt work on set links line it throws an error as not supported method

  • Unit Testing Phase

    Will testers be involve in Unit Testing Phase? Explain.

  • Testing

    1. How many types of reviews that we have in our testing?2. What is bad defect? why do we write bad defects?3. How RTM will be helpful for the QC team?

    kurtz182

    • Dec 20th, 2009

    1) There are peer reviews, walkthroughs and inspections.2) It is a high priority and/or severity bug.  We attach a high priority or severity level in the defect report and our description often c...