ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
i am new to qtp i do not know how to write script 
how to write the code to login if it fails how to able 
error messages
 Question Submitted By :: Ashok
I also faced this Question!!     Rank Answer Posted By  
 
  Re: i am new to qtp i do not know how to write script how to write the code to login if it fails how to able error messages
Answer
# 1
if Dialog("Login").Exist then
	Dialog("Login").WinEdit("Agent Name:").Set DataTable
("A",dtLocalSheet)
	Dialog("Login").WinEdit("Password:").Set DataTable
("B", dtLocalSheet)
	Dialog("Login").WinButton("OK").Click

' Check for invalid user and password
	If Dialog("Login").Dialog("Flight 
Reservations").Exist Then
			Dialog("Login").Dialog("Flight 
Reservations").WinButton("OK").Click
			Reporter.ReportEvent 
micfail,"Login","Invalid User /Pwd Check"
			msgbox "Invalid User /Pwd Check"
			ExitRun(0)
	End If
	
else
			Reporter.ReportEvent 
micfail,"Login","Login Dialog not exists"
			msgbox "Login Dialog not exists"
			ExitRun(0)
end if 	




................. any more question them let me know....... 
mail to testingwithshyam@gmail.com
 
Is This Answer Correct ?    0 Yes 0 No
Shyam.meghansh
[Hydus Technologies (INIDA) Pvt Ltd]
 
  Re: i am new to qtp i do not know how to write script how to write the code to login if it fails how to able error messages
Answer
# 2
dialog("login").active
dialog("login").winedit("username").set"asdf"
dialog("login).winedit("password").setsecure"amxcer013m34ee"
dialog("login").winbutton("ok").click

Note:for descriptive programing we must add the objects of 
the application to "Object repository"
 
Is This Answer Correct ?    0 Yes 0 No
Satyaprasad
 
 
 
  Re: i am new to qtp i do not know how to write script how to write the code to login if it fails how to able error messages
Answer
# 3
HI...What Satya..we dont need add objects to repository for
descriptive programming.

come to scenario....

dialog("login").winedit("Agent Name:").set datatable.value(1)
dialog("login").winedit("Password:").setsecure
crypt.encrypt(datatable.value(2))
dialog("login").winbutton("OK").click

If dialog("Login").dialog("text:=Flight Reservations").exist
then
dialog("Login").dialog("text:=Flight
Reservations").winbutton("text:=OK").click
dialog("Login").WinButton("Cancel").click
Else
window("Flight reservation").close
end if

like this we can handle pop up messages...

If any queries..

nanda.dreddy@gmail.com
 
Is This Answer Correct ?    0 Yes 0 No
Nanda
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
Tell about automation object model(Aom) in qtp? GE6
How to create frame work for qtp? Polaris1
How can we call Winrunner functions from QTP?  1
what are the disadvantages of descriptiveprograming GE4
I have 5 no.of Action in my Test. Out off which i should make 3rd action as my start-up action. How should i make it? IBM6
What is the method for maximize the application while we using Decriptive programming in QTP?  2
What is output value? Ordain-Solutions3
hi i have one doubt i have 4 yrs exp in testing and iam working one mnc in north but i have completed my degree correspodene is the companies are accept in south side some people are tellig they won't agree but i need correct answer plz let me know which companies are taking and not taking thanks in advance  8
What is the BPT(bussiness process testing ).and what is the main difference between BPT and QTP EDS2
Without QTP (or any Testing tool) can we able to test the GUI part of the Applications. for Example generating the Scripts in Notepad and Executing them Using VB. Is it Possible to do so..  1
whenever U using QTP,Test Director, Why we using separate Bug tracking tool?  1
LINUX environment supports QTP or not? LINUX environment supports QC or not?  2
Does QTP support Java Script also. Which is one is preferrable for QTP, VB script or Java script IBM17
Hi Friends... What you are doing in Regression Testing and how many test cases you ran in regression testing... suppose there is 1000 test cases is there how many test cases again you run .. 1000 test caes r how many... thanx in advance..  6
Diff B/w Webserver and Client Server  2
for example one window is there, the window contains how many edit box's i want script? i know the script but that is not exact answer.... The script is like this .......... set a=description.creation() a("Native class")="WinEdit" b=window("Flight Reservation").childobject(a).count msgbox b  2
I need diffrences between Object Identification, Smart Identification, Regular expresion,Low-Level Recording (enables you to record on any object in your application, whether or not QuickTest recognizes the specific object or the specific operation.) I am working on Web Application. In that object caption will change dynamically. For example, consider “Save” button. On clicking save button the caption changing as “ EDIT ”. From above concept which concept I have to use here? Ordain-Solutions2
How can we test existence of a particular word in scentence using QTP tool. Thanks in Advance!!!!!  4
What is difference b/w AOM,DOM,COM Have u ever is used ny of the models.If so why? GE1
How many types of Actions are there in QTP?  3
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com