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   To Refer this Site to Your Friends   Click Here
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
Explain types of exception handling and script for that?
 Question Submitted By :: Padmasekharpediredla
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Explain types of exception handling and script for that?
Answer
# 1
' Script :: Login
' Date ::
' Input Values :: dtable,text,mydate
'Last Modified ::

Option explicit
Dim dtable,text,mydate,url
url="C:\Program Files\Mercury Interactive\QuickTest 
Professional\samples\flight\app\flight4a.exe"
mydate=(mid(date,1,6)& right(date,2)) 'For Current Date Use 
this statement
'mydate=(right(date,2)& mid(date,3,4)& right(date,2))
'datatable.GlobalSheet.AddParameter "Date", mydate 
'datatable.Value(1,1)=mydate
datatable.Import("C:\Documents and 
Settings\Shyam\Desktop\QTP_Script\User_Login\From.xls")
datatable.Import("C:\Documents and 
Settings\Shyam\Desktop\QTP_Script\User_Login\To.xls")
'datatable.Import("C:\Documents and 
Settings\Shyam\Desktop\QTP_Script\User_Login\Agent_Name.xls"
)
'datatable.Import("C:\Documents and 
Settings\Shyam\Desktop\QTP_Script\User_Login\Password.xls")
' INVOKE The Login

'datatable(2, dtGlobalSheet)= url 
SystemUtil.Run(url)

'Check Login exist
if dialog("Login").Exist then
'dialog("Login").WinEdit("Agent Name:").Set DataTable
("Agent_Name", dtLocalSheet)
'dialog("Login").WinEdit("Password:").Set DataTable
("Password", dtLocalSheet)
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 if 
		else
			Reporter.ReportEvent 
micfail,"Login","Login Dialog not exists"
			msgbox "Login Dialog not exists"
			ExitRun(0)

end if 	
Reporter.ReportEvent micdone,"Login","Login Sucessfull"

' Enter the order information
window("Flight Reservation").WinButton
("Button_NewOrder").Click
window("Flight Reservation").ActiveX("MaskEdBox").Type 
Datatable("Fdate")
window("Flight Reservation").WinComboBox("Fly 
From:").Select Datatable



...............
Any more question mail me testingwithshyam@gmail.com
 
Is This Answer Correct ?    0 Yes 0 No
Shyam Prasad
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
What r the features of QTP9.2,other than QTP8.0 What r the extre features of QTP9.2.  2
what is input pramater out output pramater ?i want the decrepation..?how to use in QTP? Infinite-Computer-Solutions2
how we connect oracle or sql data server database to qtp Tanla-Solutions2
what's the difference in between function and sub and give some code as well Patni1
if you run one test script in internetexplorer the same test you run in mozilla ffirefox is it possible or not how is it. Satyam1
Hi, Can anyone write the following qtp script...please its urgent ·Navigate to Google in a new IE instance ·Search for the following word "Gap, Inc." ·Iterate thought the first 10 pages of google ·On each page collect the following ·The "blue" page title ·The "green" url ·Output all the data into a file named "test_output.txt" ·Format "Title – URL"  1
i want know iam working 2+ exp in QTP can i do performence testing (eg:loadrunner) yes r no? IBM6
How can I replace all the text from the QTP script with some other text. Livetek1
how many wayes we do the parameterization?  1
If a object property is changed in the application. where it should be updated in QTP... Pls anybody can give the answer.. Thanks in advance... Navis3
If an application name is changing frequently i.e while recording it has name “Window1” and then while running its “Windows2” in this case how does QTP handle? Covansys4
hi friends i was tried to connect qtp with oracle database using provider.i got a error.so anyone can help me out by correct script  2
give me the code for check point for validating application  1
Hi all, can anyone tell me the challenges u faced while using qtp?  1
When to Insert transactions in QTP? Siemens2
Today only i joined in this site. Can u please tell me definition of parameterization. and how i can do the parameterization?  3
What is the file extension of the code file & object repository file in QTP?  2
What is the difference between QTP 8.2 object repository and QTP 9.2 object repository Any body have an please give Answer Mail id: nagireddy.sn@gmail.com IBM5
what is batch run ? HCL4
If a script has a local repository and also uses a shared repository, which repository will QTP use first when searching for an object during playback?  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