Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
New+User+Registration

New+User+Registration

Ratings: (0)|Views: 1 |Likes:
Published by Kiran Kumar

More info:

Published by: Kiran Kumar on Nov 23, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

05/12/2014

pdf

text

original

'***************************************
'Global Variables Function Library
'***************************************
Public StrUrl,StrUName,StrPword
StrUrl="http://localhost:8080/mtours"
StrUName="User1003"
StrPword="mindq"
'***************************************************
Function Library
'***************************************************
Function LaunchApp(Url)
Systemutil.Run Url
If Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Exist(10)
Then
Reporter.ReportEvent micPass ,"Launch App Check","Application Launch
ed Successfully"
LaunchApp="Pass"
Else
Reporter.ReportEvent micFail ,"Launch App Check","Application n
ot launched successfully for valid Url"
LaunchApp="Fail"
End If
End Function
Function NewUserReg(UName,Pword)
Dim ActMsg,ExpMsg
ExpMsg=UName
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Regis
ter").Click
If Browser("Welcome: Mercury Tours").Page("Register: Mercury Tours").Exist(10
) Then
Reporter.ReportEvent micPass ,"Register Link Check","Application dis
plyaed New User Registration Page"
Browser("Welcome: Mercury Tours").Page("Register: Mercury Tours"
).WebEdit("userName").Set UName
Browser("Welcome: Mercury Tours").Page("Register: Mercury Tours").WebEdi
t("password").Set Pword
Browser("Welcome: Mercury Tours").Page("Register: Mercury Tours"
).WebEdit("confirmPassword").Set Pword
Browser("Welcome: Mercury Tours").Page("Register: Mercury Tours"
).Image("register").Click
ActMsg=Browser("Welcome: Mercury Tours").Page("Register: Mercury
Tours_2").WebElement("Note: Your user name is").GetROProperty("innertext")
ActMsg=mid(ActMsg,25,Len(UName))
If ExpMsg=ActMsg Then
Reporter.ReportEvent micPass ,"New User Registration Ch
eck","New User Registered Successfully"
NewUserReg="Pass"
Else
Reporter.ReportEvent micFail ,"New User Registration Ch
eck","New User Registration failed"
NewUserReg="Fail"
End If
Else
Reporter.ReportEvent micFail ,"Register Link Check","Applicatio
n not displayed New User Registration Page"
End If
End Function
Function Login(Uname,Pword)
Browser("Welcome: Mercury Tours").Page("Register: Mercury Tours_2").Link("sig
n-in").Click
Browser("Welcome: Mercury Tours").Page("Sign-on: Mercury Tours").WebEdit("use
rName").Set UName
Browser("Welcome: Mercury Tours").Page("Sign-on: Mercury Tours").WebEdit("pas
sword").Set Pword
Browser("Welcome: Mercury Tours").Page("Sign-on: Mercury Tours").Image("Login
").Click
If Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Exist(10)
Then
Reporter.ReportEvent micPass ,"New User Login Check","New User Logi
n is successful"
Login="Pass"
Else
Reporter.ReportEvent micFail ,"New User Login Check","New User
Login Failed"
Login="Fail"
End If
End Function
Function Logout()
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Image("sign-
off").Click
If browser("Welcome: Mercury Tours").Page("Sign-on: Mercury Tours").Exist The
n
Reporter.ReportEvent micPass ,"LogOut Check","System redirected to L
ogin Page"
Logout="Pass"
Else
Reporter.ReportEvent micFail ,"Logout Check","System not displa
yed Login Page"
Logout="Fail"
End If
End Function
Function CloseBrowser()
Browser("Welcome: Mercury Tours").Close
If Browser("Welcome: Mercury Tours").Exist(1) Then
Reporter.ReportEvent micFail ,"Close App Check","Application not Clo
sed Successfully"
CloseBrowser="Fail"
Else
Reporter.ReportEvent micPass ,"Close App Check","Application Cl
osed Successfully"
CloseBrowser="Pass"
End If
End Function
'**********************************************
'New User Registration Test
'**********************************************
'*****************************************************************************
'Project Name
:
Mercury Tours
'Module Name
:
Customer
'Script Desc
:
This script validates new user registration &

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->