Exforsys
+ Reply to Thread
Results 1 to 9 of 9

QTP Login function

This is a discussion on QTP Login function within the Software Testing forums, part of the Testing category; I have to automate Login function in qtp for my project following are the conditions...... If anybody has the script ...

  1. #1
    nehasahu is offline Junior Member Array
    Join Date
    May 2007
    Answers
    15

    QTP Login function

    I have to automate Login function in qtp for my project following are the conditions...... If anybody has the script for login functionality and pliz fwd it to me on hellonehasahu@yahoo.com

    Enter valid user id and valid password and click on login button
    Enter valid user id and Invalid password click on login button
    Leave user Id blank and enter valid Password click on login button
    Leave User Id and Password field blank and click on Login
    Enter Invalid User id and Invalid Password click on login

    Please fwd me the script for this .....

    thanks in advance


  2. #2
    shiva_pspr is offline Junior Member Array
    Join Date
    Feb 2008
    Answers
    5
    HI,
    Functions used when we are testing a Scenario not for a single module.

    the above ex given by u are belogns to LOGIN module only
    if you want to test scenarios like

    LOGIN -> CHECK MAIL -> LOGOUT
    LOGIN-> COMPOSE MAIL -> CHECK MAIL ->LOGOUT
    LOGIN -> ADD NEW CONTACT -> CHECK IN CONTACTS -> LOGOUT

    for the above scenarios we have to CREATE two FUNCTIONS
    1 - for LOGIN
    2 - for LOGOUT

    clear


  3. #3
    madhoo is offline Junior Member Array
    Join Date
    Aug 2004
    Answers
    8
    did u try doing recording on those scenarios. it will generate script for u


  4. #4
    shiva_pspr is offline Junior Member Array
    Join Date
    Feb 2008
    Answers
    5
    Hi,
    we never use recording method a scenario in real time.

    do u have any real time experience in qtp?
    i think u didn't have
    in real time there will be no question of recording and play back method.

    Acc to the test case Tester / Sr. Tester perpare the test scripts in notepad.
    just use those scripts for testing.
    Main use of function is REUSABILITY OF script.
    Functions never be prepared in recording method.

    Clear?


  5. #5
    madhoo is offline Junior Member Array
    Join Date
    Aug 2004
    Answers
    8
    Quote Originally Posted by shiva_pspr View Post
    Hi,
    we never use recording method a scenario in real time.

    do u have any real time experience in qtp?
    i think u didn't have
    in real time there will be no question of recording and play back method.

    Acc to the test case Tester / Sr. Tester perpare the test scripts in notepad.
    just use those scripts for testing.
    Main use of function is REUSABILITY OF script.
    Functions never be prepared in recording method.

    Clear?
    What do you think??....Do you think I dont have any experience and I am trying to answer your question.
    FYI I have a cerification from HP in QTP..

    the quickest way is to record the action you want to perform, and wrap it in a function


  6. #6
    madhoo is offline Junior Member Array
    Join Date
    Aug 2004
    Answers
    8

    Thumbs down

    Quote Originally Posted by shiva_pspr View Post
    Hi,
    we never use recording method a scenario in real time.

    do u have any real time experience in qtp?
    i think u didn't have
    in real time there will be no question of recording and play back method.

    Acc to the test case Tester / Sr. Tester perpare the test scripts in notepad.
    just use those scripts for testing.
    Main use of function is REUSABILITY OF script.
    Functions never be prepared in recording method.

    Clear?
    Look who's answering...


  7. #7
    shiva_pspr is offline Junior Member Array
    Join Date
    Feb 2008
    Answers
    5
    hi,

    There is no question of knowledge in qtp or Certification.

    First u answer the folowing questions ???

    1) You run qtp directly or using Quality Center?

    2) execute test scripts individually or whole scripts at a time?

    3) what are the main parts and requirements in a test script and at the time of execution?

    4) Exception Handling is available in qtp. If u r going to test a scenario first time using qtp how would u know that there will be an exception?


    by answering the above questions u will be realise ....
    ok
    bye


  8. #8
    kalyansantosh is offline Member Array
    Join Date
    Feb 2007
    Location
    Chennai
    Answers
    84

    Post Script

    Browser("Browsername"). Page("Pagename"). Webedit("TxtusrName"). Set U.Name
    Browser("Browsername"). Page("Pagename"). Webedit("TxtPwd"). Set Pwd
    Browser("Browsername"). Page("Pagename"). Webbutton("OK"). Click


  9. #9
    as0032873 is offline Junior Member Array
    Join Date
    Apr 2008
    Answers
    1
    --------------------------------------------------------------------------------

    Browser("Browsername"). Page("Pagename"). Webedit("TxtusrName"). Set U.Name
    Browser("Browsername"). Page("Pagename"). Webedit("TxtPwd"). Set Pwd
    Browser("Browsername"). Page("Pagename"). Webbutton("OK"). Click

    set pwd may expose ur password , So setsecure is more adequate here.
    And we should use descriptive oject for these 3 objects
    __________________


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...