Explain types of exception handling and script for that?
Answers were Sorted based on User's Feedback
Answer / av
you didn't list the types, seemed it's not quite clear
Is This Answer Correct ? | 0 Yes | 0 No |
' 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 ? | 1 Yes | 3 No |
Can anyone please tell me how to select next 5th business date from calendar using QTP/UFT ?
1 Answers Cigniti Technologies,
An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?
What is standalone database?
Hi everybody, Can anybody tell me that how the QTP frameworks are implemented . I wanted to know with examples . Thanks in advance
What is the scripting language used in QTP?
how will check the links in multiple pages at a time
give me the code for check point for validating application
Hi What are re-usable actions in QTP? -Thank You
what is the defference between calling ation and called action?
how many scripts r there in QTP? pls any answer this question?
How to handle Recovery scenario in QTP. give detailed explanation about recovery scenario.
In real time whenever we found bug , after that where you send to that bug. send to T.Lead or Directly Developer. Plz explain me?