Exforsys

Online Training

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 ...


Go Back   Exforsys > Testing > Software Testing

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-10-2007, 11:15 PM
Junior Member
 
Join Date: May 2007
Posts: 20
nehasahu is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 12:04 PM
Junior Member
 
Join Date: Feb 2008
Posts: 5
shiva_pspr is on a distinguished road
Send a message via Yahoo to shiva_pspr
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 05:26 PM
Junior Member
 
Join Date: Aug 2004
Posts: 16
madhoo
did u try doing recording on those scenarios. it will generate script for u
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 09:20 AM
Junior Member
 
Join Date: Feb 2008
Posts: 5
shiva_pspr is on a distinguished road
Send a message via Yahoo to shiva_pspr
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 05:21 PM
Junior Member
 
Join Date: Aug 2004
Posts: 16
madhoo
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 05:22 PM
Junior Member
 
Join Date: Aug 2004
Posts: 16
madhoo
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-28-2008, 07:56 AM
Junior Member
 
Join Date: Feb 2008
Posts: 5
shiva_pspr is on a distinguished road
Send a message via Yahoo to shiva_pspr
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-26-2008, 11:41 AM
kalyansantosh's Avatar
Member
 
Join Date: Feb 2007
Location: Hyderabad
Posts: 91
kalyansantosh is on a distinguished road
Send a message via Yahoo to kalyansantosh
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
__________________
Kalyansantosh
Sr QA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-15-2008, 06:47 AM
Junior Member
 
Join Date: Apr 2008
Posts: 1
as0032873 is on a distinguished road
--------------------------------------------------------------------------------

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
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit Tech FAQ 0 06-15-2004 07:00 AM
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit Tech FAQ 0 06-01-2004 07:01 AM
comp.lang.c FAQ list Table of Contents Steve Summit Tech FAQ 0 06-01-2004 07:00 AM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit Tech FAQ 0 06-01-2004 07:00 AM
comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) Steve Summit Tech FAQ 0 05-15-2004 07:00 AM


All times are GMT -4. The time now is 11:12 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.