+ All Categories
Home > Documents > Qtp Notes MSR

Qtp Notes MSR

Date post: 04-Jun-2018
Category:
Upload: mathangi-s-seetharaman
View: 229 times
Download: 0 times
Share this document with a friend

of 96

Transcript
  • 8/13/2019 Qtp Notes MSR

    1/96

    QA PLANET QTP 11.0 M. Sreedhar

    Quick Test Professional 11.0

    By

    M.Sreedhar Reddy

    24/3RT, 3rd Floor,

    Bank of India Building,

    S.R.Nagar, Hyderabad - 53!.

    040 - 40044448

    +91- 9966723111

    http://www.qaplanet.in 1 of 96

  • 8/13/2019 Qtp Notes MSR

    2/96

    QA PLANET QTP 11.0 M. Sreedhar

    !en"a

    uto#ate" Testin! $ Tools %&'en (ource)*o##ercial

    ,ntro"uction to QTP 11.0

    ,ntro"uction to QTP Test Process

    ecor" o"es

    &/ect &riente" Pro!ra##in!

    &/ect ,"entification Process

    &/ect e'ository ana!er

    B (cri't #eto"s use" in QTP

    (yncroniation

    ata ri5en test

    o"ular "ri5en fra#e ork

    ,#'le#entation of QTP 11.0 in #y current 'roect

    ""itional QTP (cri'ts

    *eck 'oints

    &ut'ut alues for erification

    uto#ation ra#eork

    http://www.qaplanet.in 2 of 96

  • 8/13/2019 Qtp Notes MSR

    3/96

    QA PLANET QTP 11.0 M. Sreedhar

    Index:

    at is uto#ate" Testin!:; 4

    ,ntro"uction to QTP 11.0 6

    "" ins 7

    ecor"in! o"es 8

    rcitecture of QTP (creen 9

    QTP

  • 8/13/2019 Qtp Notes MSR

    4/96

    QA PLANET QTP 11.0 M. Sreedhar

    >eyor" "ri5en ra#eork =7

    ?y/ri" ra#eork 60

    VB Script methods used in QTP 9.2 60

    ssociate" eto"s an" Pro'erties 8=

    http://www.qaplanet.in 4 of 96

  • 8/13/2019 Qtp Notes MSR

    5/96

    QA PLANET QTP 11.0 M. Sreedhar

    at is uto#ate" Testin!:;

    Automated Testin! is automatin the manua" testin process current"y in use.

    This re#uires that a $orma"i%ed Manua" Testin process! current"y e&ists in your company.

    Minimally, such a process includes:

    '. (etai"ed test cases) inc"udin predicta*"e e&pected resu"ts!.

    2. A standa"one Test +n,ironment) inc"udin a Test (ata*ase) such that the test cases are a*"e to

    *e repeated each time there are modi$ications made to the app"ication.

    -$ your current testin process does not inc"ude the a*o,e points) you are ne,er oin to *e a*"e to mae

    any +$$ecti,e use o$ an automated test too".

    The rea" use and purpose o$ automated test too"s is to automate reression testin. This means that

    you must ha,e or must de,e"op a data*ase o$ detai"ed test cases that are repeata*"e) and this suite

    o$ tests is run e,ery time there is a chane to the app"ication to ensure that the chane does not

    produce unintended conse#uences /errors.

    An automated test script! is a proram. Automated Script de,e"opment) to *e e$$ecti,e) must *e su*1ect

    to the same ru"es and standards that are app"ied to so$tare de,e"opment.

    Benefits of uto#ation Testin!@a 3ast* Re"ia*"ec Repeata*"ed Reusa*"ee 4omprehensi,e$ Proramma*"e.

    a astAutomation too" runs tests sini$icant"y more $aster than human users.

    / elia/leAutomation too" can per$orm the same operation each time) i$ you repeated mu"tip"e times)

    so that e can e"iminate human errors.c e'eata/le5e can chec ho app"ication or e*site reacts a$ter repeated the same operation ithmu"tip"e times.

    " eusa/leAutomation scripts are reusa*"e on di$$erent ,ersion o$ the app"ication o$ e*sites e,en i$the user inter$aces chanes.

    e *o#'reensi5e-n automation testin e can *ui"d a suit o$ tests that co,ers e,ery $eature in the app"icationor e*site.

    f Pro!ra##a/le.5e can proram sophisticated Tests that *rin out hidden in$ormation $rom the app"ication.

    http://www.qaplanet.in 5 of 96

  • 8/13/2019 Qtp Notes MSR

    6/96

    QA PLANET QTP 11.0 M. Sreedhar

    ra/acks of uto#ation Testin!

    -t is e&pensi,e

    5e cannot automate a"" areas.

    ac o$ e&pertisation.

    -t has some "imitations /-t cannot test e,ery thin

    ic (oftare Testin! soul" /e auto#ate"; Tests that need to *e e&ecute o$ e,ery *ui"d o$ the app"ication /Sanity Testin

    Tests that use mu"tip"e data ,a"ues /Retestin 7 (ata (ri,es Testin

    Tests that re#uired data $rom app"ication intimates /8..-. Attri*utes oad and Stress

    Testin

    ic (oftare Testin! soul" not /e auto#ate"; sa*i"ity Testin

    :ne time testin

    Quic "oo Tests or A.S.A.P /As soon as possi*"e Testin Ad;hoctestin 7 Random Testin

    4ustomers re#uirement are $re#uent"y chanin.

    uto#ate" functional testin! tools

    :pen Source /3R++ Too"s

    Bad*oy

    Sahi

    Se"enium

    4ommercia"

    Test partner

    +mpiri& eTest Suite

    QTP

    ,ntro"uction to QTP 11.0

    Mercury -nteracti,e commercia" Product. P. 3unctiona"ity Testin Too". sed $or Reression Testin. A,ai"a*"e in ,arious ,ersions "ie 6.?) @.2) 9.0) 9.') 9.2) 9.?) '0.0 and ''.0. -t supports 3unctiona" Testin o$ a"" popu"ar en,ironments) inc"udin 5indos) 5e*) .

  • 8/13/2019 Qtp Notes MSR

    7/96

    QA PLANET QTP 11.0 M. Sreedhar

    A ne $eature 4hec Synta&! introduced under the Too"s! menu item /hich is used $orchecin Synta& errors in the Script

    3unction (e$inition 8enerator is direct"y introduced hich is used $or creatin ser (e$ined3unctions easi"y.

    A ne menu item 5indos! is introduced in order to manae the indos.

  • 8/13/2019 Qtp Notes MSR

    8/96

    QA PLANET QTP 11.0 M. Sreedhar

    5e* 2.0 Too"it App"ications Support Automatica""y Parameteri%e Steps Si",er"iht Add;in +&tend 5P3 and Si",er"iht Support

    ,ntro"uction to Quick Test Process

    Quic Test testin process consists o$ D main phases

    '. Preparin to record

    Test +n,ironment

    Test 4onditions /Reression Test 4ase

    2. Recordin a session on your app"ication

  • 8/13/2019 Qtp Notes MSR

    9/96

    QA PLANET QTP 11.0 M. Sreedhar

    1.(tan"ar" ecor"in!@

    Records the test in terms o$ 8- o*1ects. Records the o*1ects in your app"ication and the operations

    per$ormed on them. This mode is the de$au"t and taes $u"" ad,antae o$ Quic Test=s test o*1ect

    mode".

    2.nalo! ecor"in!@

    +na*"es you to record the e&act mouse and ey*oard operations you per$orm in re"ation to either the

    screen or the app"ication indo.

    Re"ati,e to Screen ; VB Script Statement H

    (estop.RunAna"o ITrac'I

    Re"ati,e to 5indo ; VB Script Statement H

    5indo /IMicroso$t -nternetI.Run Ana"o ITrac'I

    The trac $i"e ca""ed *y the Run Ana"o method contains a"" your ana"o data and is stored ith theaction.

    Aa5i!ationStart Recordin /3E J Automation Menu J Ana"o Recordin J

    Ana"o Recordin Settins /Shi$t K A"t K 3E J

    4"ic on J 4"ic on Start Ana"o Record J Record your re#uired :peration J Stop

    Recordin /3G

    8enera""y e are usin Ana"o Recordin Mode to compare (iita" Sinatures) Barcodes)Scienti$ic 8raphs etc.)

    3.

  • 8/13/2019 Qtp Notes MSR

    10/96

    QA PLANET QTP 11.0 M. Sreedhar

    26

    3

    4

    '. Test Pane

    2. Acti,e ScreenE. -n$ormation paneG. Resources pane?. (ata Ta*"e6. (e*u Vieer

    1 Test Pane

    -n this QTP disp"ays the Test Script hich you record on the app"ication.To ,ie the Test scripts) there are to modes such as/i Leyord Vie /ii +&pert Vie.(i) Keyword View-n this mode QTP disp"ays the test script in o*1ect hierarchy ay and it pro,ides documentation$or e,ery operation.There are /G Parts /i -tem /ii :peration /iii Va"ue /i,(ocumentation "ies as *e"o.

    (ii) Expert View

    -n this mode QTP disp"ays the Test script in VB Script.

    2 ata Ta/le

    -t is used to store the data and parameteri%e that data to the test script There are /2 Sheets *y de$au"t. They are /' 8"o*a" /2 Action' -n one data ta*"e e i"" ha,e 2?6 Sheets. :ut o$ 2?6 sheets) one sheet is 8"o*a" and

    remainin 2?? sheets are Action Sheets 8"o*a" Sheet re"ated to a"" the tests. Action Sheet re"ated to correspondin Action on"y.

    3 cti5e (creen-n this QTP captures indo snapshots $or e,ery o*1ect operations and disp"ays thoseimaes in Acti,e Screen Area.

    "5anta!es +asy to insert 4hec Points +asy to insert :utput ,a"ues.

    +asy to add o*1ects to a"" o*1ect repository.

    http://www.qaplanet.in 10 of 96

  • 8/13/2019 Qtp Notes MSR

    11/96

    QA PLANET QTP 11.0 M. Sreedhar

    +asy to insert steps.

    +asy to understand script *y o*ser,in imaes in acti,e screen area

    isa"5anta!es-t occupies "ot o$ space to store the snapshots.

    To "isa/le cti5e (creen

    Too"s J :ptions J Acti,e Screen Ta* J 4ustom e,e" J under 5indos app"icationsSe"ect

  • 8/13/2019 Qtp Notes MSR

    12/96

    QA PLANET QTP 11.0 M. Sreedhar

    These are *ui"t in $unctiona"ity o$ the o*1ect. The VBScript code that e rite /or record actua""y maes

    ca""s to the methods o$ an o*1ect

    e.. Reporter.Report+,ent/

    >ere Report+,ent is the method o$ the Reporter o*1ect

    5ents

    These are hat can *e done to an o*1ect. This is used *y prorammers to determine hat an o*1ect

    does in response to an action you per$orm. -t is hoe,er unused in QTP.

    &/ect ,"entification

    ?o QTP learns o/ects in a''lication;

    Stores :*1ect as Test :*1ect) (eterminin the c"ass it $its.

    Mandatory properties

    Assisti,e properties

    :rdina" identi$ier

    Smart -denti$ication

    an"atory 'ro'erties@

    5hi"e recordin) $or each test o*1ect c"ass) QTP "earns a "ist o$ mandatory properties to uni#ue"y identi$y

    the o*1ect.

    ssisti5e 'ro'erties@

    -$ not su$$icient) QTP adds assisti,e properties unti" is has compi"ed a uni#ue description

    &r"inal i"entifier@

    -$ no assisti,e properties are a,ai"a*"e or i$ not su$$icient) QTP adds a specia" an ordina" identi$ier types

    as index, location andcreationtime o$ the o*1ects are used to create a uni#ue identi$ication

    (#art ,"entification@

    A Smart -denti$ication de$inition can he"p QuicTest identi$y an o*1ect) i$ it is present) e,en hen the

    recorded description $ai"s due to chanes in one or more property ,a"ues.

    &/ect ,"entification ialo! BoC

    http://www.qaplanet.in 12 of 96

  • 8/13/2019 Qtp Notes MSR

    13/96

    QA PLANET QTP 11.0 M. Sreedhar

    Aa5i!ationToo"s Menu J :*1ect -denti$ication J Se"ect /Standard 5indo as +n,ironment J Se"ect Test:*1ect 4"ass hich you ant to con$iure J Tae re#uired mandatory properties 7 Assisti,eProperties *y c"icin Add 7 Remo,e Button J Se"ect +na*"e Smart -denti$ication Properties J 4"ic4on$iure J Tae Base 3i"ter 7 :ptiona" $i"ter Properties *y c"icin Add 7 Remo,e Button JN4"ic:NJNSe"ect :rdina" -denti$ierNJN4"ic :NJNStart RecordinNJNRecord re#uired :peration J StopRecordin J Run J Ana"y%e Resu"ts manua""y.

    Ty'es of &/ects

    1. Test &/ect@

    -t is an o*1ect that Quic test creates in test to represent the actua" o*1ect in the app"ication. -t he"ps QTPto identi$y and chec the o*1ect durin the run session

    2. un-Ti#e &/ects@

    -t is the actua" o*1ect in your e* site or app"ication on hich methods are per$ormed durin the runsession

    &/ect e'ository

    -nter$ace *eteen QTP Script and the app"ication 4ontains oica"

  • 8/13/2019 Qtp Notes MSR

    14/96

    QA PLANET QTP 11.0 M. Sreedhar

    Ty'es of o/ect re'ositories

    1. Per action o/ect re'ository@

    Stores o*1ects that are associated ith one speci$ic component Action) so that on"y that component canaccess the stored o*1ects.

    2. (are" o/ect re'ository@

    Stores o*1ects that can *e accessed *y mu"tip"e components

    "b#e$% Re&o'i%ory (anager

    Fou can open the :*1ect Repository Manaer *y choosin Resources Menu and c"ic on :*1ectRepository Manaer.

    The :*1ect Repository Manaer ena*"es you to open mu"tip"e shared o*1ect repositories and modi$ythem as needed. Fou can open shared o*1ect repositories *oth $rom the $i"e system.

    http://www.qaplanet.in 14 of 96

  • 8/13/2019 Qtp Notes MSR

    15/96

    QA PLANET QTP 11.0 M. Sreedhar

    &'erations 'erfor#e" /y &/ect e'ository ana!er

    4reatin

  • 8/13/2019 Qtp Notes MSR

    16/96

    QA PLANET QTP 11.0 M. Sreedhar

    &/ect e'ository er!e Tool

    Fou open the :*1ect Repository Mere Too" *y choosin Too"s menu O c"ic on :*1ect RepositoryMere Too" in the :*1ect Repository Manaer.

    Aa5i!ation - er!e an" associate e'ositories@

    '. 8enerate Script $or -PS Add Aent and :*ser,e o*1ects are stored in :*1ect Repository2. +&port and sa,e the o*1ects /:R' o$ script') usin :*1ect Repository /8o to Resources menu

    and c"ic :*1ect repository. -n :*1ect repository o to 3i"e menu and c"ic on +&port oca"

    o*1ects= and Sa,e it into e&istin $o"der.E. 8enerate Script $or -PS (e"ete Aent and o*ser,e :*1ects are stored in :*1ect Repository

    http://www.qaplanet.in 16 of 96

  • 8/13/2019 Qtp Notes MSR

    17/96

  • 8/13/2019 Qtp Notes MSR

    18/96

    QA PLANET QTP 11.0 M. Sreedhar

    C@15indo/I3"iht Reser,ationI.Acti,ate

    5indo/I3"iht Reser,ationI.5inButton/Ipdate :rderI.4hec 4hecPoint/I4PW'I5indo/I3"iht Reser,ationI.5inMenu/IMenuI.Se"ect I3i"e:pen :rder...I5indo/I3"iht Reser,ationI.5inButton/Ipdate :rderI.4hec 4hecPoint/I4PW2I5indo/I3"iht Reser,ationI.(ia"o/I:pen :rderI.5in4hecBo&/I:rder e"p Menu J 4"ic on a*out J -nsert Menu /QTP J 4hec Point J 4"ic Bit Map

    4hec Point J Sho Bitmap ith hand icon

    4"ic : J +nter

  • 8/13/2019 Qtp Notes MSR

    19/96

    QA PLANET QTP 11.0 M. Sreedhar

    ?o to insert ceck 'oint trou! cti5e (creenStart Recordin J >e"p Menu J 4"ic on a*out J 4"ic on Bit Map J Stop

    Recordin J 4"ic on Acti,e Screen -con J Riht c"ic on Bit Map hich you ant to chec J 4"icon -nsert Bitmap 4hec Point J 4"ic : J +nter

  • 8/13/2019 Qtp Notes MSR

    20/96

    QA PLANET QTP 11.0 M. Sreedhar

    Step 'H 4onnect to (ata*ase usin (S< /(ata Source

  • 8/13/2019 Qtp Notes MSR

    21/96

    QA PLANET QTP 11.0 M. Sreedhar

    = TeCt rea *eck Point5e can use this 4hecpoint to conduct test on Te&t present in the speci$ied screen area.

    Aa5i!ationStart Recordin J -nsert Menu J 4hec Point J 4"ic on Te&t Area 4hec Point J Se"ectthe area speci$ied to chec J 4"ic : J +nter and -con J Se"ect Pae J 4"ic : J +nter and -conNJN4"icNJNSe"ect 5e* Ta*"eNJN4"ic :NJN+nter name o$ the 4hecpoint J Se"ect 4e"" J+nter your e&pected data in constant J 4"ic : J Stop Recordin J Run J Ana"y%e Resu"tsmanua""y.

    Aote@For Web TableBroser/Broser Te&t :*1ect

  • 8/13/2019 Qtp Notes MSR

    22/96

    QA PLANET QTP 11.0 M. Sreedhar

    >o can e chec Too" Tips J A"t Property.

    9 D< *eck PointTo ,eri$y the content o$ an M $i"e e can use this chec point.

    Aa5i!ation-nsert Menu J 4hec point J M 4hec Point /3rom 3i"e J Brose your M 3i"e path J 4"ic: J +nter name o$ the 4hecpoint J Se"ect +"ement and -con J 4"ic J : JN+nter

  • 8/13/2019 Qtp Notes MSR

    23/96

    QA PLANET QTP 11.0 M. Sreedhar

    ait %10

    irtual o/ect confi!uration@

    -t is a process o$ main the QTP to treat the user;de$ined o*1ects or non;reconi%ed areas as speci$ico*1ects. $or this QTP is pro,ide to options '.

  • 8/13/2019 Qtp Notes MSR

    24/96

  • 8/13/2019 Qtp Notes MSR

    25/96

    QA PLANET QTP 11.0 M. Sreedhar

    B (cri't Built in eto"s

    %1

  • 8/13/2019 Qtp Notes MSR

    26/96

    QA PLANET QTP 11.0 M. Sreedhar

    (yntaC@ trim /Strin+&H &I Sai I

    ms*o& trim/&

    %8 F*ase5e can use this $unction to con,ert oer 4ase into pper 4ase

    (yntaC@ ucase /Strin+&H &IsairamI ms*o& ucase/&

    %9

  • 8/13/2019 Qtp Notes MSR

    27/96

    QA PLANET QTP 11.0 M. Sreedhar

    (yntaC@Sp"it /e&pression) de"imiter +&H sI-ndia is a reat countryI

    arrsp"it/s) I I

    ms*o& arr/0 J -ndia

    ms*o& arr/' J is

    ms*o& arr/2 J a

    ms*o& arr/E J reat

    ms*o& arr/G

    J

    country

    %17 Goin-t is used to return a strin created *y 1oinin a speci$ied no. o$ su*strins contained in an

    array.

    (yntaC@

    +&H 1oin /"ist) de"imiter

    sI-ndia is a reat countryI arrsp"it/s) I I

    ms*o& arr/0

    J

    -ndia

    ms*o& arr/' J is

    ms*o& arr/2 J a

    ms*o& arr/E J reat

    ms*o& arr/G J country

    ms*o& 1oin/arr) I I

    Aote>o to add to ,aria*"es ,a"ues.aISaiI*IRamIms*o& aspace/'0*

    %18 ('ace-t is used to create a speci$ic

  • 8/13/2019 Qtp Notes MSR

    28/96

    QA PLANET QTP 11.0 M. Sreedhar

    Aote4tr" K M J 4omment B"oc4tr" KShi$t K M J ncomment B"oc

    %20 ate-t is used to return current system date.

    (yntaC@ms*o& date

    %21 Ti#e-t is used to return current system time.

    (yntaCms*o& time

    %22 Ao

    (yntaC ms*o& no

    %23 eek"ayna#e

    (yntaCms*o& eedayname/eeday/date

    AoteThe de$au"t ,aria*"e type in VB Script is Variant!

    or

  • 8/13/2019 Qtp Notes MSR

    29/96

    QA PLANET QTP 11.0 M. Sreedhar

    +nd -$ ms*o& Ia is reaterIe"se i$ *Oc then

    ms*o& I* is reaterI e"se

    ms*o& Ic is reaterI+nd -$

    +nd -$

    (elect *ase-t is simi"ar to Sitch Statement

    Synta& +&HSe"ect 4ase Varia*"e &input*o&/I+nter a"pha*etI4ase I,a"ue'I) I,a"ue2I) XXX Se"ect 4ase &

    Statement 4ase IaI) IeI) IiI) IoI) IuI4ase Va"ue! ms*o& I-t is Voe"I

    Statement 4ase e"se4ase e"se ms*o& I-t is not Voe"I

    Statement +nd Se"ect+nd Se"ect

    ?o to "eclare 5aria/les in B (cri't;

    To dec"are ,aria*"es in VB Script e are usin one script.

    %i &'tion C'licitTo $orci*"y dec"are ,aria*"es /This statement disp"ay error messae $or undec"ared,aria*"es

    %iii# aria/le1H aria/le2H aria/le3H II.. aria/les

    /To dec"are ,aria*"es

    T?&(

    Eetisi/leTeCt5e can use this method to capture ,isi*"e te&t.

    *o"e@Varia*"e5indo/I5indo

  • 8/13/2019 Qtp Notes MSR

    30/96

    QA PLANET QTP 11.0 M. Sreedhar

    +&H

    (ia"o/IoinI.Acti,ate

    & (ia"o/IoinI.5inButton/I:LI.8etR:Property/I+na*"edI ms*o& &

    &ut'ut

    EetT&Pro'erty5e can use this method to capture te&t o*1ect ,a"ue into ,aria*"e. :r5e can use this method to capture o*1ect property ,a"ue $rom the o*1ect Repository.

    *o"eVaria*"e 5indo/I5indo

  • 8/13/2019 Qtp Notes MSR

    31/96

    QA PLANET QTP 11.0 M. Sreedhar

    C@ a'0 *20-$ *aK'0 Then

    ms*o& I* is e#ua" to aIprint I* is e#ua" to aIreporter.Report+,ent micPass) I* is e#ua" to aI) ITest is PassI e"sems*o& I* is not e#au" to aIprint I* is not e#ua" to aIreporter.Report+,ent mic3ai") I* is not e#ua" to aI) ITest is $ai"I

    +nd -$

    (te' Eenerator %7-t is used to enerate steps in the Test pane ithout c"ic on start Recordin.Step 8enerator consists o$ statements in three cateories such as/i 3unctions/ii ti"ity o*1ects/iii Test :*1ects.

    %i unctionsThis cateory speci$ies a"" enera" and mathematica" operations such as "e$t) riht) "en) time)cint) cd*") cstr) "trim) rtrim) trim etc.)

    %ii Test &/ectThis cateory speci$ies the operations hich are per$ormed on the o*1ects such as Set)Se"ect) Acti,ate) SetSecure) 4"ic) 8etVisi*"eTe&t) 8etR:Property) 8etT:Property)8et-tem) 8et-tem4ount) 8et4ontent X. +tc.)

    %iii Ftility &/ectsThis cateory speci$ies a"" misce""aneous operations such as (ataTa*"e:perations)Systemti" :perations) Q4ti" :perations) Reco,ery :perations etc.)

    Pre'are scri't for calculation Test in ''lication li!t eser5ation

    :ption e&p"icit(im &)y)tot)i3or i ' to ? step ' 5indo/I3"ihtReser,ationI.Acti,ate5indo/I3"iht Reser,ationI.5inMenu/IMenuI.Se"ect I3i"e:pen :rder...I 5indo/I3"ihtReser,ationI.(ia"o/I:pen :rderI.5in4hecBo&/I:rder

  • 8/13/2019 Qtp Notes MSR

    32/96

    QA PLANET QTP 11.0 M. Sreedhar

    Parameter typesH

    (ata ta*"e

    Random num*er

    +n,ironment ,aria*"e

    *reate ata "ri5en tests

    QuicTest Pro ena*"es you to create and run tests) hich are dri,en *y data stored in ta*"e.

    5hen you test your app"ication) you may ant to chec ho it per$orms the same operations ith

    mu"tip"e sets o$ data.

    or eCa#'leH

    Suppose you ant to chec ho your app"ication responds to ten separate sets o$ data. Fou cou"d

    record ten separate tests) each ith its on set o$ data.

    lternati5elyH

    Fou cou"d create a data;dri,en test ith a "oop that runs ten times.

    Para#eteriin! Tests - (te's for Para#eteriation

    '. (e$inin a (ata Ta*"e Parameter

    2. Addin Parameter Va"ues to a (ata Ta*"e

    E. Modi$yin Steps A$$ected *y Parameteri%ation

    G. Runnin and Ana"y%in a Parameteri%ed Test

    esults

    A$ter runnin a test) e can ,ie a report o$ ma1or e,ents that occurred durin the test run.

    -$ any iterations are $ai"ed7arnin report it as a de$ect usin TacK E.E.

    Test Script

    AT

    Script

    5ith 5indo/I3"iht Reser,ationI.5inMenu/IMenuI.Se"ect I3i"e:pen :rder...I

    http://www.qaplanet.in 32 of 96

  • 8/13/2019 Qtp Notes MSR

    33/96

    QA PLANET QTP 11.0 M. Sreedhar

    .(ia"o/I:pen :rderI.5in4hecBo&/I:rder

  • 8/13/2019 Qtp Notes MSR

    34/96

    QA PLANET QTP 11.0 M. Sreedhar

    &ut'ut

    (yntaC@ datata*"e.8etRo4ount C@ ms*o& datata*"e.8etRo4ount

    %= Eet(eet5e can use this method to return a speci$ied sheet $rom the Run Time data ta*"e.

    (yntaC@ datata*"e.8etSheet/Sheet-(

    C@ ms*o& datata*"e. 8etSheet/'.8etRo4ount

    %6 alue5e can use this method to set or et ,a"ue o$ ce"" in the speci$ied parameter and the currentro o$ the Rum time data ta*"e.

    To set "ata(yntaC@ datata*"e.Va"ue/ParameterW

  • 8/13/2019 Qtp Notes MSR

    35/96

    QA PLANET QTP 11.0 M. Sreedhar

    %9 (etPre5o5e can use this method to tae the ro *e$ore the current Ro as

  • 8/13/2019 Qtp Notes MSR

    36/96

    QA PLANET QTP 11.0 M. Sreedhar

    5indo/I3"iht Reser,ationI.5inButton/Ipdate :rderI.4"ic

    ait /'0

    & 5indo/I3"iht Reser,ationI.Acti,e/IThreed Pane" 4ontro"I.

    8etVisi*"eTe&t/

    yIpdate (one...I

    -$ strcomp/&)y)' 0 Then

    reporter.Report+,ent micPass)Ipdate doneI) ITest is passI

    e"se

    +nd -$reporter.Report+,ent mic3ai") Ipdate $ai"I) ITest is $ai"I

  • 8/13/2019 Qtp Notes MSR

    37/96

    QA PLANET QTP 11.0 M. Sreedhar

    5e can use this c"ass to e&ecute speci$ied (M Statements /-nsert) pdate) (e"ete onconnected data*ase.

    *o"e@

    Set como*1create:*1ect /A(:(B.4ommand!

    4omo*1.Acti,e4onnection cono*1 4omo*1.4ommandTe&t SQ Statement! 4omo*1.+&ecute

    %iii ecor"set

    5e can use this c"ass to e&ecute speci$ied se"ect statement on

    *o"e@

    connected data*ase and retrie,e the resu"ts.

    Set rso*1 create:*1ect /A(:(B.recordset!

    Rso*1.open SQ Statement!) cono*1

    C

    :ption e&p"icit

    (im como*1) cono*1

    Set cono*1createo*1ect/IA(:(B.4onnectionI

    cono*1.open IPro,iderMicroso$t.et.:+(B.G.0(ata

    Source4H](ocuments and Settins]Sai Sar,ani](estop]samp"e.md*I

    Set como*1createo*1ect /IA(:(B.4ommandI como*1.acti,econnection cono*1como*1.commandte&t I-nsert into emp ,a"ues /^Appa Rao^) '0') '0000I como*1.e&ecutecono*1.c"oseSet como*1 nothin Setcono*1 nothin

    %i5 Aotin!

  • 8/13/2019 Qtp Notes MSR

    38/96

    QA PLANET QTP 11.0 M. Sreedhar

    (im como*1)cono*1)rcount)i)ename)eno)esa"

    Set cono*1createo*1ect/IA(:(B.4onnectionI

    cono*1.open IPRo,iderMicroso$t.1et.o"ed*.G.0

    data Source 4H](ocuments and Settins]Sai Sar,ani](estop]samp"e.md*I

    Set como*1createo*1ect/IA(:(B.4ommandI

    como*1.acti,econnectioncono*1

    datata*"e.AddSheet /IdataI

    datata*"e.-mportSheet I4H](ocuments and Settins]Sai Sar,ani](estop]

    testdata.&"sI)')IdataI

    rcountdatata*"e.8etSheet/IdataI.etrocount3or i' to rcount step 'datata*"e.Set4urrentRo /i enamedatata*"e.Va"ue /') IdataI enodatata*"e.Va"ue /2) IdataIesa"datata*"e.Va"ue /E) IdataIcomo*1.commandte&t Iinsert into emp ,a"ues /^IenameI^) IenoI) Iesa"IIcomo*1.e&ecute

  • 8/13/2019 Qtp Notes MSR

    39/96

    QA PLANET QTP 11.0 M. Sreedhar

    cono*1.c"oseSet rso*1nothinSet cono*1nothin

    +&H

    ata/ase Testin!

    :ption e&p"icit(im con) con') rs) rs') (:3) 33) 3T) P

  • 8/13/2019 Qtp Notes MSR

    40/96

    QA PLANET QTP 11.0 M. Sreedhar

    Set $$so.opente&t$i"e /Path o$ te&t $i"e!) modeRead;') 5rite;2) Append;@hi"e $.atendo$"i"e $a"ses$.read"ineXXX..XXXX.XXX.. .set sXXXX

    XXXXX5end $.c"ose

    C:ption e&p"icit (im $so)$)s)&Set $socreateo*1ect/IScriptin.$i"esystemo*1ectISet $$so.opente&t$i"e /I4H](ocuments and Settins]Sai Sar,ani](estop] input.t&tI)'

    $.sip"ine

    5ith 5indo/I3"iht Reser,ationI.(ia"o/I:pen :rderI5hi"e $.atendo$"ine $a"se

    s$.read"ine

    5indo/I3"iht Reser,ationI.5inMenu/IMenuI.Se"ect I3i"e:pen :rder...I.5in4hecBo&/I:rder

  • 8/13/2019 Qtp Notes MSR

    41/96

    QA PLANET QTP 11.0 M. Sreedhar

    C@

    ?o to count nu#/er of ite#s in te ly ro# *o#/o BoC an" o to"is'lay teir na#e one /y one.

    s 5indo/I3"iht Reser,ationI.5in4om*oBo&/I3"y 3romHI. 8et-tems4ount/

    ms*o& s3or i0 to n;' step 'y 5indo/I3"iht Reser,ationI.5in4om*oBo&/I3"y 3romHI.8et-tem/i ms*o& y

  • 8/13/2019 Qtp Notes MSR

    42/96

    QA PLANET QTP 11.0 M. Sreedhar

    ms*o& .name

  • 8/13/2019 Qtp Notes MSR

    43/96

    QA PLANET QTP 11.0 M. Sreedhar

    Clo"eProce""*y+d

    4"oses a process accordin to its Process -( /P-(.

    Clo"eProce""*y/a'e

    4"oses a process accordin to its name.

    Clo"eProce""*yWndTitle

    4"oses a"" processes that are oners o$ indos ith the speci$ied tit"e.

    0n

    Runs a $i"e or app"ication.

    nblock+npt

    Re;ena*"es ey*oard and mouse input e,ents a$ter a B"oc-nput statement as used to *"oc them.

    ?o to close a s'ecifie" file

    +&H& 5indo/ISo"itaireI.8etR:Property/I>ndIsystemuti".4"oseProcessBy>nd /&

    Aote

    A$ter e,ery o*1ect . A$tere,ery,aria*"e !

    ?o to in5oke s'ecific e/'a!e trou! s'ecific /roser;Set iecreateo*1ect/I-nternete&p"orer.app"icationI ie.,isi*"e

    trueie.na,iate I.oo"e.comI

    ?o to close all te /rosers at a

    ti#e Aa5i!ation

    Too"s Menu J :ptions J 5e* Ta* J Ad,anced J Se"ect Broser c"eanup under Run Timesettins J : J : J Put any script J Run

    ?o to close Po'u's "urin! un Ti#ea'0*20 Set o*1createo*1ect/Iscript.she""I

    -$ *aK'0 Theno*1.popup I* is e#ua" to aI) 2 /Time in Seconds e"seo*1.popup I* is not e#ua" to aI) ?

    +nd -$

    ?o to count nu#/er of links in a s'ecific e/'a!e an" o to "is'lay teir

    na#es one /y one.Set &description.4reate&/Imic4"assI.,a"ue IinsI^set " Broser/IA-< BA

  • 8/13/2019 Qtp Notes MSR

    44/96

    QA PLANET QTP 11.0 M. Sreedhar

    ('ell *ecksSet mcreateo*1ect /I5ord.app"icationIm.,isi*"e trueSet "description.4reate"/Imic4"assI.,a"ueIinIm Broser /IA-< BA

  • 8/13/2019 Qtp Notes MSR

    45/96

    QA PLANET QTP 11.0 M. Sreedhar

    -nsert O 4a"" to

  • 8/13/2019 Qtp Notes MSR

    46/96

    QA PLANET QTP 11.0 M. Sreedhar

    5hene,er e are usin 3rameor) the Script Temp"ate $ie"ds must *e used *y the Test +nineer$or a"" Actions.

    To sa,e the Time ithout ritin Temp"ate $ie"ds $or e,ery Action manua""y) QTP pro,ides a $eatureca""ed A4T-:< T+MPAT+!.

    -$ e de$ine the Temp"ate $ie"ds in Action Temp"ate) here onards) Temp"ate i"" *e a,ai"a*"e *yde$au"t $or e,ery ne action.

    Aa5i!ation@ :pen ostost

  • 8/13/2019 Qtp Notes MSR

    47/96

    QA PLANET QTP 11.0 M. Sreedhar

    Records your re#uired operation J 3i"e Menu J Settins J +n,ironment Ta* JNSe"ect ,aria*"e typeas ser (e$ined!NJNAdd +n,ironment

  • 8/13/2019 Qtp Notes MSR

    48/96

    QA PLANET QTP 11.0 M. Sreedhar

    To create ser (e$ined 3unctions e can $o""o *e"o synta&.

    Pu*"ic 7 Pri,ate 3unction 3unctionW

  • 8/13/2019 Qtp Notes MSR

    49/96

    QA PLANET QTP 11.0 M. Sreedhar

    C 2@ ?o to associate all files "urin! unti#e:ption e&p"icit (imstruid)strpd)res)res'e&ecute$i"e I4H](ocuments and Settins]Sai Sar,ani](estop]$"ihtres.,*sIen,ironment.oad3rom3i"e I4H](ocuments and Settins]Sai Sar,ani](estop]QTP]en,ironment.&m"I

    repositoriesco""ection.Add I4H](ocuments and Settins]Sai Sar,ani](estop]QTP]o*1ectrepository.tsrIstruiden,ironment.Va"ue /IuidIstrpden,ironment.Va"ue /IpdIres"oin/struid)strpd ms*o& resres'insert/ms*o& res' "oout/

    fli!tres.5/s3unction "oin /struid)strpdSystemti".Run I4H]Proram 3i"es]Mercury -nteracti,e]QuicTest Pro$essiona"]samp"es]$"iht]app]$"ihtGa.e&eI

    5ith (ia"o/IoinI.5in+dit/IAent

  • 8/13/2019 Qtp Notes MSR

    50/96

    QA PLANET QTP 11.0 M. Sreedhar

    e/u!!in! te Test

    Pause

    Step -nto/3''

    Step :,er /3'0

    Step :ut /Shi$t K 3''

    Run to Step /4tr" K 3'0 (e*u $rom Step

    Add to 5atch /4tr" K T

    -nsert 7 Remo,e Breapoint /39

    +na*"e 7 (isa*"e Breapoint /4tr" K 39

    4"ear a"" Breapoint /4tr" K Shi$t K 39 +na*"e 7 (isa*"e a"" Breapoints

    (te' ,nTo %115e can use this option to e&ecute one "ine o$ statement) i$ the statement is $unction ca"" or actionca"") then it i"" step into 3unction or Action.

    (te' &ut %(ift + 115e can use this option to e&ecute remainin statements in the $unction o$ Action $rom the position o$

    pointer

    eco5ery (cenario ana!erTo reco,er $rom une&pected e,ents and errors that are occurred in the test en,ironment durin runsession) e can use Reco,ery Scenario Manaer.

    3or ood reco,ery) error must *e non the occurrence is unnon.There are /G Types o$ e,ents such as

    ''lication *rasAn open app"ication $ai"s durin Test Run.

    Aa5i!ationResources Menu NReco,ery Scenario Manaer N4"ic

  • 8/13/2019 Qtp Notes MSR

    51/96

    QA PLANET QTP 11.0 M. Sreedhar

    Resources Menu NReco,ery Scenario Manaer N

  • 8/13/2019 Qtp Notes MSR

    52/96

    QA PLANET QTP 11.0 M. Sreedhar

    uto#ation ra#eork

    Automation 3rame or is nothin *ut an Automation p"annin $or the pro1ect hich is prepared *y

    Test ead.

    -t he"ps to contro" the automation pro1ect in a *etter ay.

    5e are usin our on $rameor hich is prepared *y my Test ead.

    Automation 3rame or containsH

    5hat $unctiona"ities to *e automated

    5hat Approach to *e $o""oed

    5hat "e,e"s e ha,e to use in order to de,e"op the scripts /either it is Record and P"ay*ac or

    Actions or VB script etc.)

    5hat namin con,entions to *e $o""oed.

    5here to store the scripts

    4a""in the scripts /usin Batch runner) Actions etc)..

    (irectory structure o$ automation

    5here to store the Test resu"ts.

    Ta/le of contents

    1 5hat is Automation 3rameor`2 Automation Testin o*1ecti,esE Ad,antaes o$ Automation 3rameorG Test Automation i$e 4yc"e? Approach $or Test Automation6. 8uide"ines $o""oed $or identi$ication o$ Test 4ases $or automationD. (irectory Structu

    ?T ,( &>;

    Automation 3rameor is a set o$ uide"ines) a set o$ codin standards) a set o$ assumptions) concepts)and practices that pro,ide support $or automated so$tare testin.

    http://www.qaplanet.in 52 of 96

  • 8/13/2019 Qtp Notes MSR

    53/96

    QA PLANET QTP 11.0 M. Sreedhar

    -t is "ie a p"an $or Automation Testin) in hich it in,o",es the identi$ication o$ common $unctiona"ity)de$inin codin standards and namin con,entions) *ui"din Reusa*"e i*rary 3i"es) -denti$yin possi*"eruntime e&ceptions and creatin the 3o"der7(irectory Structure *e$ore creatin the actua" scripts.

    http://www.qaplanet.in 53 of 96

  • 8/13/2019 Qtp Notes MSR

    54/96

    QA PLANET QTP 11.0 M. Sreedhar

    uto#ation testin! o/ecti5es

    3eature o$ automation

    Automation is particu"ar"y he"p$u" $or reression testin) as it a""os reression testin o$ critica"*usiness ith minima" e$$ort.

    4onsistent and repeata*"e test e&ecution

    A*i"ity to run tests unattended

    Automation testin can increase testin re"ia*i"ity) reusa*i"ity and repeata*i"ity hi"e decreasinthe time and e$$ort re#uired comp"etin a test cyc"e.

    3aster e&ecution o$ indi,idua" tests hich canH

    o Resu"t in a shorter time $rame $or test e&ecution) and

    o A""o more thorouh retestin o$ $i&es.

    (ata (ri,en methodo"oy pro,ides the opportunity to sini$icant"y increase test co,erae*ecause more data input com*inations and di$$erent data choices can *e #uic"y e&ecuted

    Automated Testin pro,ides increased test co,erae throuh test e&ecution repetition. Testscripts can *e immediate"y re;e&ecuted $or system en,ironment chanes) such asH operatinsystem uprades) rep"acin o"d computer hardare) or checin $or con$"icts hen otherapp"ications are added to the en,ironment.

    Automated testin too"s pro,ide a centra" data repository $or storin test step documentation

    hich resu"ts in easier retrie,a" and reuse o$ e&istin test p"ans and test scripts.

    The centra" data repository a"so stores the test e&ecution resu"ts hich pro,ides easier retrie,a"and ana"ysis o$ the test resu"ts.

    http://www.qaplanet.in 54 of 96

  • 8/13/2019 Qtp Notes MSR

    55/96

  • 8/13/2019 Qtp Notes MSR

    56/96

    QA PLANET QTP 11.0 M. Sreedhar

    http://www.qaplanet.in 56 of 96

  • 8/13/2019 Qtp Notes MSR

    57/96

  • 8/13/2019 Qtp Notes MSR

    58/96

    QA PLANET QTP 11.0 M. Sreedhar

    7. irectory (tructure

    The $o""oin diaram shos the directory structure to *e $o""oed in QA P"anet automation 3rameor.

  • 8/13/2019 Qtp Notes MSR

    59/96

    QA PLANET QTP 11.0 M. Sreedhar

    D@ >eyor" "ri5en ra#eork %,#'ortant

    -n this $rameor e are preparin script $or scenario usin $unctions and dri,en the script itheyords.

    Aa5i!ationRecord re#uired operation 4reate $unctions $or them Tae the script into

  • 8/13/2019 Qtp Notes MSR

    60/96

    QA PLANET QTP 11.0 M. Sreedhar

    Sa,e the +&ce" 3i"e in speci$ied "ocation :pen

  • 8/13/2019 Qtp Notes MSR

    61/96

    QA PLANET QTP 11.0 M. Sreedhar

    (atata*"e.-mportSheet I+H]S-PSWAutomation]Testdata]Leyord.&"sI)2)ITestcaseI(atata*"e.-mportSheet I+H]S-PSWAutomation]Testdata]Leyord.&"sI)E)ITeststepIMcountdatata*"e.8etSheet/IModu"eI.etrocount3or i' to Mcount step '

    datata*"e.Set4urrentRo/i

    Me&edatata*"e.Va"ue/E)IModu"eI-$ case/Me&eIFI ThenModu"eiddatata*"e.Va"ue/')IModu"eITcountdatata*"e.8etSheet/ITestcaseI.etrocount3or 1' to Tcount step '

    datata*"e.Set4urrentRo/1Tce&edatata*"e.Va"ue/E)ITestcaseIModu"eid'datata*"e.Va"ue/G)ITestcaseI-$ Modu"eidModu"eid' and case/Tce&eIFI Then

    Tciddatata*"e.Va"ue/')ITestcaseITscount(atata*"e.8etSheet/ITeststepI.etrocount3or ' to Tscount step '

    datata*"e.Set4urrentRo/Tcid'datata*"e.Va"ue/6)ITeststepI-$ TcidTcid' Then

    Leyord(atata*"e.Va"ue/E)ITeststepI Se"ect 4ase Leyord 4ase I:AI

    Strur"+n,ironment.Va"ue/IStrur"IRes:penapp/Strur"(atata*"e.Va"ue/?)ITeststepIRes

    4ase I

  • 8/13/2019 Qtp Notes MSR

    62/96

    QA PLANET QTP 11.0 M. Sreedhar

    B (cri't #eto"s use" in QTP 9.2

    ,n5oke''lication eto"

    escri'tion-n,oesan e&ecuta*"e app"ication.

  • 8/13/2019 Qtp Notes MSR

    63/96

    QA PLANET QTP 11.0 M. Sreedhar

    escri'tion(ese"ects an item in the o*1ect^s "ist.

    (yntaC/

  • 8/13/2019 Qtp Notes MSR

    64/96

    QA PLANET QTP 11.0 M. Sreedhar

    Ca#'leThe $o""oin e&amp"e dras the item "ocated at coordinates ??) '' in the "ist and drops it onto ite#32inthe "ist.V*5indo/I$rmMainI.V*istVie/I3i"esI.(ra ??) ''V*5indo/I$rmMainI.V*istVie/I3i"esI.(rop:n-temIitemE2I

    "it

  • 8/13/2019 Qtp Notes MSR

    65/96

    QA PLANET QTP 11.0 M. Sreedhar

    (yntaC/

  • 8/13/2019 Qtp Notes MSR

    66/96

    QA PLANET QTP 11.0 M. Sreedhar

    (elect eto"

    escri'tionSe"ects an item $rom the o*1ect^s "ist.

    (yntaC/

  • 8/13/2019 Qtp Notes MSR

    67/96

    QA PLANET QTP 11.0 M. Sreedhar

    (et,te#(tate eto"

    escri'tionSets the state o$ a chec *o& icon o$ the speci$ied item in a "ist ,ie.

    (yntaC/

  • 8/13/2019 Qtp Notes MSR

    68/96

    QA PLANET QTP 11.0 M. Sreedhar

    efault L 1.

    Ca#'leThe $o""oin e&amp"e mo,es the scro"" *ar D "ines don.V*5indo/I$rmMainI.V*Scro""Bar/IScro""BarI.

  • 8/13/2019 Qtp Notes MSR

    69/96

    QA PLANET QTP 11.0 M. Sreedhar

    escri'tionSets the scro"" *ar position.

    (yntaC/(crollBar%de"cription.(et Vale

    r!u#ent Ty'e escri'tion

    Vale

  • 8/13/2019 Qtp Notes MSR

    70/96

    QA PLANET QTP 11.0 M. Sreedhar

    Aote@-$ you ant to retrie,e the return ,a"ue o$ a checpoint) you must add parentheses around thename o$ the checpoint in the statement. 3or e&amp"eHa *roser/IMyBroserI.pae/IMyPaeI.chec %checPoint/IMyPropertyI

    eturn alueBoo"ean

    Ca#'leThe $o""oin e&amp"e uses the *eckmethod on the

  • 8/13/2019 Qtp Notes MSR

    71/96

    QA PLANET QTP 11.0 M. Sreedhar

    *lick eto"

    escri'tion4"ics on an o*1ect.

    (yntaCV*&b6ect%de"cription.*lickxHyH *tton

    r!u#ent Ty'e escri'tion

    x T) 2M-((+.

    efaultL0 %

  • 8/13/2019 Qtp Notes MSR

    72/96

    QA PLANET QTP 11.0 M. Sreedhar

    Ca#'leThe $o""oin e&amp"e dras and drops the -nsert:rder $rame.V*5indo/I$rmMainI.V*3rame/I-nsert :rderI.(ra'0) 20V*5indo/I$rmMainI.V*3rame/I-nsert :rderI.(rop E0) G0The $o""oin e&amp"e dras the o*1ect $rom coordinates '0) 20 ithin the Test indo and drops theo*1ect at coordinates E0) G0 ithin the :ther5indo indo.V*5indo/ITestI.(ra'0) 20V*5indo/I:ther5indoI.(rop E0) G0or ithin the same indo.V*5indo/ITestI.(ra'0) 20V*5indo/ITestI.(rop E0) G0

    ro' eto"escri'tionPer$orms the drop part o$ a dra and drop operation.

    (yntaCV*&b6ect%de"cription.ro'xHyH*tton

    r!u#ent Ty'e escri'tion

    x, y T)2M-((+. efaultL0 %

  • 8/13/2019 Qtp Notes MSR

    73/96

    QA PLANET QTP 11.0 M. Sreedhar

    (yntaCV*&b6ect%de"cription.Eet&Pro'erty%Property H in9Prop-ata

    r!u#ent Ty'e escri'tion

    Property Strin Property to retrie,e $rom the o*1ect.

    in9Prop-ata

  • 8/13/2019 Qtp Notes MSR

    74/96

    QA PLANET QTP 11.0 M. Sreedhar

    escri'tionReturns the co""ection o$ properties and ,a"ues that QuicTest uses to identi$y the o*1ect /the test o*1ectdescription sa,ed in the o*1ect repository.

    (yntaCV*&b6ect%de"cription.EetT&Pro'erties

    eturn alueVariant

    Ca#'leThe $o""oin e&amp"e uses the EetT&Pro'ertiesmethod to retrie,e the "ist o$ properties and ,a"uesused to identi$y the cm*To! com*o *o&.Set o*1 V*5indo/I$rmMainI.V*4om*oBo&/Icm*ToI.8etT:PropertiesThe $o""oin e&amp"e returns a Property co""ection containin the test o*1ect description /properties and,a"ues $or the ?el'V*Button o*1ect) and then disp"ays the property name and ,a"ue o$ each property inthe returned co""ection.Set theTest:*1ect V*5indo/IoinI.V*Button/I>e"pISet Props theTest:*1ect.8etT:PropertiesProps4ount Props.4ount3or i 0 To Props4ount;'

    Prop

  • 8/13/2019 Qtp Notes MSR

    75/96

    QA PLANET QTP 11.0 M. Sreedhar

    escri'tionReturns the te&t $rom the speci$ied area. The area is de$ined *y pairs o$ coordinates that desinate todiaona""y opposite corners o$ a rectan"e.

    Aotes@This method is supported on"y in 5indos

  • 8/13/2019 Qtp Notes MSR

    76/96

    QA PLANET QTP 11.0 M. Sreedhar

    :*1ect Property

    escri'tionAccesses the interna" methods and properties o$ an Acti,e o*1ect. 3or more in$ormation) see The:*1ect Property.

    (yntaCVi"al*a"ic&b6ect/-e"cription.:*1ect.Method9to9acti%ate %

    or(et #y&/LVi"al*a"ic&b6ect%-e"cription.&/ect#y&/.Method9to9acti%ate%

    Ca#'le-n the $o""oin e&amp"e) suppose the /outButtonmethod is supported $or your Visua" Basic o*1ect.To acti,ate the /outButtonmethod) you ou"d insert the $o""oin statement into your test scriptHSet ,a"ueV*5indo/I$rmoinI.V*Button/ISu*mitI.:*1ect.A*outButton/A"ternati,e"y) you cou"d insert the $o""oinHSet My:*1V*5indo/I$rmoinI.V*Button/ISu*mitI.:*1ect.My:*1.A*outButton/

    &ut'ut eto"

    escri'tion-nserts the ,a"ue o$ an o*1ect into an output ,a"ue co"umn.

  • 8/13/2019 Qtp Notes MSR

    77/96

    QA PLANET QTP 11.0 M. Sreedhar

    V*5indo/ITestI.SetT:PropertyI-nde&I) 2

    Ty'e eto"escri'tionTypes the speci$ied strin in the o*1ect.

  • 8/13/2019 Qtp Notes MSR

    78/96

    QA PLANET QTP 11.0 M. Sreedhar

    3or a "ist o$ the o*1ect^s interna" properties and methods seeHhttp;

  • 8/13/2019 Qtp Notes MSR

    79/96

    QA PLANET QTP 11.0 M. Sreedhar

    3ontnder"ine

    -ndicates hether the $ont sty"e is under"ined.Possi*"e ,a"uesH

    True alse/(e$au"t

    heiht The o*1ect^s heiht /in pi&e"s.

    h5ndThe /Microso$t 5indos hand"e o$ the run;time o*1ect^s indo. 3or morein$ormation) see h5nd Property.

    inde&

    The ordina" identi$ier that QuicTest assins to the o*1ect to indicate the order inhich the o*1ect appears in the code re"ati,e to other o*1ects ith an otheriseidentica" description. This property cannot *e used ith Eet&Pro'erty. Thisproperty is anoptiona" property.Va"ues *ein ith 0.3or more in$ormation) seeThe -nde& Property!.

    "e$tThe distance *eteen the interna" "e$t ede o$ an o*1ect and the "e$t ede o$ itscontainer.

    "ocation

    The ordina" identi$ier that QuicTest assins to the o*1ect to indicate here the o*1ectappears ithin the indo) $rame) or dia"o *o&. Va"ues are assined $rom top to*ottom) and "e$t to riht. This property cannot *e used ith Eet&Pro'erty. Thisproperty is anoptiona" property.Va"ues *ein ith 0.3or more in$ormation) seeThe ocation Property!.

    name The o*1ect=s name.

  • 8/13/2019 Qtp Notes MSR

    80/96

    QA PLANET QTP 11.0 M. Sreedhar

    True alse /(e$au"t

    ,isi*"e

    -ndicates hether the o*1ect is ,isi*"e.Possi*"e ,a"uesH

    True

    alse

    idth The o*1ect^s idth /in pi&e"s.

    indo idThe o*1ect^s indo identi$ier.

    & The o*1ect^s &;coordinate /"e$t re"ati,e to the parent indo /in pi&e"s.

    y The o*1ect^s y;coordinate /top re"ati,e to the parent indo /in pi&e"s.

    ?n" Pro'erty

    DescriptionReturns a hand"e to a run;time o*1ect^s indo.Aote@This property is use$u" hen you need to ca"" 5inE2 AP- $unctions.Syntax/Button%de"cription.Eet&Pro'erty%Mn"M

    ExampleThe $o""oin e&amp"e uses the n"property to chane the tit"e o$ the dia"o.^(ec"are 5inAP- Set5indoTe&t $unction+&tern.(ec"are micon) ISet5indoTe&tI) IuserE2.d""I) ISet5indoTe&tAI) mic>nd) micStrin^8et hand"e o$ the I-nternet :ptionsI dia"oh(" Broser/Intit"edI.(ia"o/I-nternet :ptionsI.8etR:Property/Ih5ndI^4a"" Set5indoTe&t $unction to chane the dia"o tit"e+&tern.Set5indoTe&t h(") ISome other tit"eI

    Eet*ontent eto"

    escri'tionReturns a"" o$ the items in the o*1ect^s "ist.

    (yntaC/*o#/oBoC%de"cription.Eet*ontent

    eturn alueStrin

    Ca#'le

    The $o""oin e&amp"e returns the items in the cm*To com*o *o&.4ontentsV*5indo/I$rmMainI.V*4om*oBo&/Icm*ToI.8et4ontent

    Eet,te# eto"

    escri'tionReturns the ,a"ue o$ the item speci$ied *y the inde&.

    (yntaC/*o#/oBoC%de"cription.Eet,te# %+ndex

    r!u#ent Ty'e escri'tion

    +ndex

  • 8/13/2019 Qtp Notes MSR

    81/96

    QA PLANET QTP 11.0 M. Sreedhar

    eturn alueStrin

    Ca#'leThe $o""oin e&amp"e returns the ,a"ue o$ the second item in the "ist.itemVa" V*5indo/I$rmMainI.V*4om*oBo&/Icm*ToI.8et-tem/'

    (et eto"

    escri'tionSets the ,a"ue o$ a Visua" Basic chec *o&.

    (yntaC/*eckBoC%de"cription.(et Vale

    r!u#ent Ty'e escri'tion

    Vale StrinThe ,a"ue to *e assined to the chec *o&. The ,a"ue can *eH &A) &) or,/$or three;state chec *o&es.

    Ca#'leThe $o""oin e&amp"e sets the -nsert :rder chec *o& to :

  • 8/13/2019 Qtp Notes MSR

    82/96

    QA PLANET QTP 11.0 M. Sreedhar

    r!u#ent Ty'e escri'tion

    +te' StrinThe item to se"ect $rom the "ist. The item ,a"ue /ith #uotes or numeric inde&/ithout #uotes can denote the item. The $irst item in a "ist is num*ered 0.

    Ca#'leThe $o""oin e&amp"e se"ects the item Ae Nork$rom the c#/ro#com*o *o&.V*5indo/I$rmMainI.V*4om*oBo&/Icm*3romI.Se"ectI

  • 8/13/2019 Qtp Notes MSR

    83/96

    QA PLANET QTP 11.0 M. Sreedhar

  • 8/13/2019 Qtp Notes MSR

    84/96

    QA PLANET QTP 11.0 M. Sreedhar

    tart$ine

  • 8/13/2019 Qtp Notes MSR

    85/96

    QA PLANET QTP 11.0 M. Sreedhar

    escri'tionSe"ects an additiona" item $rom a mu"ti;se"ection "ist.

    (yntaC/

  • 8/13/2019 Qtp Notes MSR

    86/96

    QA PLANET QTP 11.0 M. Sreedhar

    r!u#ent Ty'e escri'tion

    +te' Strin

  • 8/13/2019 Qtp Notes MSR

    87/96

    QA PLANET QTP 11.0 M. Sreedhar

    Eet(election eto"

    escri'tionReturns a"" o$ the se"ected items in the o*1ect^s "ist.

    (yntaC

    /T) 2M-((+.efaultL0 %

  • 8/13/2019 Qtp Notes MSR

    88/96

    QA PLANET QTP 11.0 M. Sreedhar

    escri'tionSe"ects a"" "ist items *eteen /and inc"udin the to speci$ied items.Aote@This method is app"ica*"e on"y to "ists that a""o mu"tip"e se"ection.

    (yntaC/

  • 8/13/2019 Qtp Notes MSR

    89/96

    QA PLANET QTP 11.0 M. Sreedhar

    ssociate" eto"s an" Pro'ertiesFou can use the test o*1ect methods and properties associated ith the V*Button o*1ect to test *uttono*1ects.The methods "isted *e"o are associated ith the V*Button o*1ect. Many o$ these are common to a""Visua" Basic test o*1ects. Synta& and e&amp"es $or common methods are descri*ed in 4ommonMethods and Properties.Synta& and e&amp"es $or V*Button;speci$ic methods are descri*ed in thissection.3or a "ist o$ pre;de$ined properties associated ith the V*Button test o*1ect) seeV*Button Test :*1ectProperties.

    4aptureBitmap Method

    4hec Method

    4hi"d:*1ects Method

    4"ic Method

    (*"4"ic Method

    (ra Method

    (rop Method

    +&ist Method

    8etR:Property Method

    8etTe&tocation Method

    8etT:Properties Method

    8etT:Property Method

    8etVisi*"eTe&t Method

    MouseMo,e Method

    :*1ect Property

    :utput Method

    SetT:Property Method

    Type Method

    5aitProperty Method

    /*eckBoC &/ect

    escri'tionA Visua" Basic chec *o& o*1ect.

    ssociate" eto"s an" Pro'ertiesFou can use the test o*1ect methods and properties associated ith the V*4hecBo& o*1ect to testchec *o& o*1ects.The methods "isted *e"o are associated ith the V*4hecBo& o*1ect. Many o$ these are common to a""Visua" Basic test o*1ects. Synta& and e&amp"es $or common methods are descri*ed in 4ommonMethods and Properties.Synta& and e&amp"es $or V*4hecBo&;speci$ic methods are descri*ed in thissection.3or a "ist o$ pre;de$ined properties associated ith the V*4hecBo& test o*1ect) seeV*4hecBo& Test:*1ect Properties.

    4aptureBitmap Method 4hec Method

    4hi"d:*1ects Method

    4"ic Method

    (*"4"ic Method

    (ra Method

    (rop Method

    +&ist Method

    8etR:Property Method

    8etTe&tocation Method

    8etT:Properties Method

    8etT:Property Method 8etVisi*"eTe&t Method

    http://www.qaplanet.in 89 of 96

  • 8/13/2019 Qtp Notes MSR

    90/96

    QA PLANET QTP 11.0 M. Sreedhar

    MouseMo,e Method

    :*1ect Property

    :utput Method

    Set Method

    SetT:Property Method

    Type Method 5aitProperty Method

    /*o#/oBoC &/ect

    escri'tionA Visua" Basic com*o *o& o*1ect.

    ssociate" eto"s an" Pro'ertiesFou can use the test o*1ect methods and properties associated ith the V*4om*oBo& o*1ect to testcom*o *o& o*1ects.The methods "isted *e"o are associated ith the V*4om*oBo& o*1ect. Many o$ these are common toa"" Visua" Basic test o*1ects. Synta& and e&amp"es $or common methods are descri*ed in 4ommon

    Methods and Properties.Synta& and e&amp"es $or V*4om*oBo&;speci$ic methods are descri*ed in thissection.3or a "ist o$ pre;de$ined properties associated ith the V*4om*oBo& test o*1ect) see V*4om*oBo& Test:*1ect Properties.

    4aptureBitmap Method

    4hec Method

    4hi"d:*1ects Method

    4"ic Method

    (*"4"ic Method

    (ra Method

    (rop Method

    +&ist Method

    8et4ontent Method

    8et-tem Method

    8etR:Property Method

    8etSe"ection Method

    8etTe&tocation Method

    8etT:Properties Method

    8etT:Property Method

    8etVisi*"eTe&t Method

    -tems4ount Method

    MouseMo,e Method

    :*1ect Property

    :utput Method Se"ect Method

    SetT:Property Method

    Type Method

    5aitProperty Method

    /"it &/ect

    escri'tionA Visua" Basic edit o*1ect.

    ssociate" eto"s an" Pro'erties

    Fou can use the test o*1ect methods and properties associated ith the V*+dit o*1ect to test edit *o&o*1ects.

    http://www.qaplanet.in 90 of 96

  • 8/13/2019 Qtp Notes MSR

    91/96

    QA PLANET QTP 11.0 M. Sreedhar

    The methods "isted *e"o are associated ith the V*+dit o*1ect. Many o$ these are common to a"" Visua"Basic test o*1ects. Synta& and e&amp"es $or common methods are descri*ed in 4ommon Methods andProperties. Synta& and e&amp"es $or V*+dit;speci$ic methods are descri*ed in this section.

    3or a "ist o$ pre;de$ined properties associated ith the V*+dit test o*1ect) see V*+dit Test :*1ect

    Properties. 4aptureBitmap Method

    4hec Method

    4hi"d:*1ects Method

    4"ic Method

    (*"4"ic Method

    (ra Method

    (rop Method

    +&ist Method

    8etR:Property Method

    8etTe&tocation Method

    8etT:Properties Method 8etT:Property Method

    8etVisi*"eTe&t Method

    MouseMo,e Method

    :*1ect Property

    :utput Method

    Set Method

    Set4aretPos Method

    SetSecure Method

    SetSe"ection Method

    SetT:Property Method

    Type Method

    5aitProperty Method

    /"itor &/ect

    escri'tionA Visua" Basic mu"ti;"ine edit o*1ect.

    ssociate" eto"s an" Pro'ertiesFou can use the test o*1ect methods and properties associated ith the V*+ditor o*1ect to test mu"ti;"ineeditor o*1ects.The methods "isted *e"o are associated ith the V*+ditor o*1ect. Many o$ these are common to a""

    Visua" Basic test o*1ects. Synta& and e&amp"es $or common methods are descri*ed in 4ommonMethods and Properties.Synta& and e&amp"es $or V*+ditor;speci$ic methods are descri*ed in thissection.3or a "ist o$ pre;de$ined properties associated ith the V*+ditor test o*1ect) see V*+ditor Test :*1ectProperties.

    4aptureBitmap Method

    4hec Method

    4hi"d:*1ects Method

    4"ic Method

    (*"4"ic Method

    (ra Method

    (rop Method +&ist Method

    8etR:Property Method

    http://www.qaplanet.in 91 of 96

  • 8/13/2019 Qtp Notes MSR

    92/96

    QA PLANET QTP 11.0 M. Sreedhar

    8etTe&tocation Method

    8etT:Properties Method

    8etT:Property Method

    8etVisi*"eTe&t Method

    MouseMo,e Method :*1ect Property

    :utput Method

    Set4aretPos Method

    SetSe"ection Method

    SetT:Property Method

    Type Method

    5aitProperty Method

    /ra#e &/ect

    escri'tionA Visua" Basic $rame o*1ect.

    ssociate" eto"s an" Pro'erties

    Fou can use the test o*1ect methods and properties associated ith the V*3rame o*1ect to test $rameo*1ects.The methods "isted *e"o are associated ith the V*3rame o*1ect. Many o$ these are common to a""Visua" Basic test o*1ects. Synta& and e&amp"es $or common methods are descri*ed in 4ommonMethods and Properties.Synta& and e&amp"es $or V*3rame;speci$ic methods are descri*ed in thissection.3or a "ist o$ pre;de$ined properties associated ith the V*3rame test o*1ect) see V*3rame Test :*1ectProperties.

    4aptureBitmap Method

    4hec Method

    4hi"d:*1ects Method

    4"ic Method

    (*"4"ic Method

    (ra Method

    (rop Method

    +&ist Method

    8etR:Property Method

    8etTe&tocation Method

    8etT:Properties Method 8etT:Property Method

    8etVisi*"eTe&t Method

    MouseMo,e Method

    :*1ect Property

    :utput Method

    SetT:Property Method

    Type Method

    5aitProperty Method

    /

  • 8/13/2019 Qtp Notes MSR

    93/96

    QA PLANET QTP 11.0 M. Sreedhar

    ssociate" eto"s an" Pro'ertiesFou can use the test o*1ect methods and properties associated ith the V*a*e" o*1ect to test static te&to*1ects.

    The methods "isted *e"o are associated ith the V*a*e" o*1ect and are common to a"" Visua" Basictest o*1ects. Synta& and e&amp"es $or common methods are descri*ed in 4ommon Methods andProperties.3or a "ist o$ pre;de$ined properties associated ith the V*a*e" test o*1ect) see V*a*e" Test :*1ectProperties.

    4aptureBitmap Method

    4hec Method

    4hi"d:*1ects Method

    +&ist Method

    8etR:Property Method

    8etT:Properties Method

    8etT:Property Method

    MouseMo,e Method

    :*1ect Property

    :utput Method

    SetT:Property Method

    5aitProperty Method

    /

  • 8/13/2019 Qtp Notes MSR

    94/96

    QA PLANET QTP 11.0 M. Sreedhar

    8etT:Property Method

    8etVisi*"eTe&t Method

    -tems4ount Method

    MouseMo,e Method

    :*1ect Property

    :utput Method

    Se"ect Method Se"ectRane Method

    Set-temState Method

    SetT:Property Method

    Type Method

    5aitProperty Method

    /

  • 8/13/2019 Qtp Notes MSR

    95/96

    QA PLANET QTP 11.0 M. Sreedhar

    :utput Method

    Se"ect Method

    Se"ectRane Method

    Set-temState Method

    SetT:Property Method

    Type Method

    5aitProperty Method

    /a"ioButton &/ect

    escri'tionA Visua" Basic radio *utton o*1ect.

    ssociate" eto"s an" Pro'erties

    Fou can use the test o*1ect methods and properties associated ith the V*RadioButton o*1ect to testradio *utton o*1ects.The methods "isted *e"o are associated ith the V*RadioButton o*1ect. Many o$ these are common toa"" Visua" Basic test o*1ects. Synta& and e&amp"es $or common methods are descri*ed in 4ommonMethods and Properties.Synta& and e&amp"es $or V*RadioButton;speci$ic methods are descri*ed in thissection.

    3or a "ist o$ pre;de$ined properties associated ith the V*RadioButton test o*1ect) see V*RadioButtonTest :*1ect Properties.

    4aptureBitmap Method

    4hec Method

    4hi"d:*1ects Method

    4"ic Method

    (*"4"ic Method

    (ra Method

    (rop Method

    +&ist Method 8etR:Property Method

    8etTe&tocation Method

    8etT:Properties Method

    8etT:Property Method

    8etVisi*"eTe&t Method

    MouseMo,e Method

    :*1ect Property

    :utput Method

    Set Method

    SetT:Property Method

    Type Method

    5aitProperty Method

    http://www.qaplanet.in 95 of 96

  • 8/13/2019 Qtp Notes MSR

    96/96

    QA PLANET QTP 11.0 M. Sreedhar

    /(crollBar &/ect

    escri'tionA Visua" Basic scro"" *ar o*1ect.

    ssociate" eto"s an" Pro'erties

    Fou can use the test o*1ect methods and properties associated ith the V*Scro""Bar o*1ect to test scro""*ar o*1ects.The methods "isted *e"o are associated ith the V*Scro""Bar o*1ect. Many o$ these are common to a""Visua" Basic test o*1ects. Synta& and e&amp"es $or common methods are descri*ed in 4ommonMethods and Properties.Synta& and e&amp"es $or V*Scro""Bar;speci$ic methods are descri*ed in thissection.3or a "ist o$ pre;de$ined properties associated ith the V*Scro""Bar test o*1ect) see V*Scro""Bar Test:*1ect Properties.

    4aptureBitmap Method

    4hec Method

    4hi"d:*1ects Method

    4"ic Method

    (*"4"ic Method

    (ra Method

    (rop Method

    +&ist Method

    8etR:Property Method

    8etTe&tocation Method 8etT:Properties Method

    8etT:Property Method

    8etVisi*"eTe&t Method

    MouseMo,e Method


Recommended