SlideShare ist ein Scribd-Unternehmen logo
1 von 8
gcreddy@gcreddy.com


                   User Defined Functions

Visit:


www.gcreddy.com
for QTP Scripts

----------------------------------------------------------

i) Launching Application

Navigation:
a) Launch the Browser
b) Enter / Select the URL (“www.jjperfumes.com”)

Verification: Capture the Browser Name and Verify

—————

Function Launch_App()
SystemUtil.Run “C:Program FilesInternet
ExplorerIEXPLORE.EXE”,”",”C:Documents and SettingsAdministrator”,”open”
Browser(“Google”).Page(“Google”).Sync
Browser(“Google”).Navigate “http://www.jjperfumes.com/”
Wait (8)
Browser_Name = Browser(“Google”).GetROProperty(“title”)

If Browser_Name=”JJ Perfumes-Discount perfume cheap brand name perfumes,
fragrance & cologne online” Then
Launch_App=”Jjperumes.com Browser Launched Sucessfully”
Msgbox Launch_App
Else
Launch_App=”Jjperumes.com Browser Not Launched”
Msgbox Launch_App
End If
End Function

——————————————————————————————–

ii) Customer Registration

Pre-Setup: Launching Application




                               QTP Training                                  1
gcreddy@gcreddy.com

Navigation:
a) Select Registration Link in   jjperfumes.com homepage
b) Enter all Mandatory details
c) Select Submit button

Verify: Capture confirmation Message and Verify

Function Register(Email)
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume”).Link(“Register”).Click
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebList(“usertype”).Select “Retailer”
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebEdit(“firstname”).Set “dfgdg”
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebEdit(“lastname”).Set “dgdfgdfg”
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebList(“gender”).Select “Male”
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebEdit(“address1″).Set “dfgfdgf”
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebEdit(“phone”).Set “9222222223″
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebEdit(“email”).Set Email
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebEdit(“city”).Set “chennai”
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebList(“state”).Select “MS – MISSISSIPPI”
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebEdit(“zip”).Set “23456″
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebEdit(“password”).SetSecure
“3c30bbc7daa0dccb83c2941bb87fa0709d34″
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebEdit(“conPass”).SetSecure
“3c30bbcdb1f7a32d27a56f70a60f7d1e4159″
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_2″).WebButton(“Submit”).Click
Wait (5)
Confirm_Message = Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-
Discount perfume_3″).WebElement(“Registered
successfully.”).GetROProperty(“innertext”)

If Confirm_Message=”Registered successfully. “Then
Register=”Customer Registration Sucessful”
Msgbox Register
Else
Register=”Registration Failed”
Msgbox Register
End If
End Function




                                 QTP Training                                  2
gcreddy@gcreddy.com

——————-

Function Register(Email)
Set myBrowser=Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-
Discount perfume_2″)
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume”).Link(“Register”).Click
myBrowser.WebList(“usertype”).Select “Retailer”
myBrowser.WebEdit(“firstname”).Set “dfgdg”
myBrowser.WebEdit(“lastname”).Set “dgdfgdfg”
myBrowser.WebList(“gender”).Select “Male”
myBrowser.WebEdit(“address1″).Set “dfgfdgf”
myBrowser.WebEdit(“phone”).Set “9222222223″
myBrowser.WebEdit(“email”).Set Email
myBrowser.WebEdit(“city”).Set “chennai”
myBrowser.WebList(“state”).Select “MS – MISSISSIPPI”
myBrowser.WebEdit(“zip”).Set “23456″
myBrowser.WebEdit(“password”).SetSecure
“3c30bbc7daa0dccb83c2941bb87fa0709d34″
myBrowser.WebEdit(“conPass”).SetSecure
“3c30bbcdb1f7a32d27a56f70a60f7d1e4159″
myBrowser.WebButton(“Submit”).Click
Wait (5)
Confirm_Message = Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-
Discount perfume_3″).WebElement(“Registered
successfully.”).GetROProperty(“innertext”)

If Confirm_Message=”Registered successfully. “Then
Register=”Customer Registration Sucessful”
Msgbox Register
Else
Register=”Registration Failed”
Msgbox Register
End If

End Function

iii) Login Operation

Pre-Requisites:
a) Launching Application
b) Customer Registration
Navigation:
a) Select “Login” Link in jjperfumes.com homepage
b) Enter Email and Password
c) Select “Login Button”

Verify: Check existence of LogOut Link

—————–




                               QTP Training                                    3
gcreddy@gcreddy.com

Function Login(Email, Pwd)
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ   Perfumes-Discount
perfume”).Link(“Login”).Click
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ   Perfumes-Discount
perfume_2″).WebEdit(“username”).Set Email
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ   Perfumes-Discount
perfume_2″).WebEdit(“password”).Set Pwd
Browser(“JJ Perfumes-Discount perfume”).Page(“JJ   Perfumes-Discount
perfume_2″).WebButton(“Login”).Click

If Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount
perfume_3″).Link(“Logout”).Exist(10) Then
Login=”Login Operation Sucessful”
Msgbox Login
Else
Login=”Login Failed”
Msgbox Login
End If
End Function

iv) Closing Application

————————
Navigation:
————
a) Check the Existence of jjperfumes.com Browser
b) Close the Browser window (If exists)
—————–

Function Launch_App()
SystemUtil.Run “C:Program FilesInternet
ExplorerIEXPLORE.EXE”,”",”C:Documents and SettingsAdministrator”,”open”
Browser(“Google”).Page(“Google”).Sync
Browser(“Google”).Navigate “http://www.jjperfumes.com/”
Wait (8)
Browser_Name = Browser(“Google”).GetROProperty(“title”)

If Browser_Name=”JJ Perfumes-Discount perfume cheap brand name perfumes,
fragrance & cologne online” Then
Launch_App=”Jjperumes.com Browser Launched Sucessfully”
Msgbox Launch_App
Else
Launch_App=”Jjperumes.com Browser Not Launched”
Msgbox Launch_App
End If
End Function

**********************************************************

v) Login Operation In Flight Reservation Application



                              QTP Training                                   4
gcreddy@gcreddy.com

Function Login (Agent, Password)
SystemUtil.Run “C:Program FilesHPQuickTest
Professionalsamplesflightappflight4a.exe”,”",”C:Program FilesHPQuickTest
Professionalsamplesflightapp”,”open”
Dialog(“Login”).Activate
Dialog(“Login”).WinEdit(“Agent Name:”).Set Agent
Dialog(“Login”).WinEdit(“Password:”).Set Password
wait 2
Dialog(“Login”).WinButton(“OK”).Click
If Window(“Flight Reservation”).Exist(12) Then
Window(“Flight Reservation”).Close
Login=”Login Operation Sucessful”
Msgbox Login
Else
SystemUtil.CloseDescendentProcesses
‘If Dialog(“Login”).Dialog(“Flight Reservations”).Exist(2) Then
‘Dialog(“Login”).Dialog(“Flight Reservations”).WinButton(“OK”).Click
‘Dialog(“Login”).WinButton(“Cancel”).Click
‘End if
Login=”Login Failed”
Msgbox Login
End if
End Function
———————————

vi) Open Order In Flight Reservation Application

Function Open_Order(Order_Number)
Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).WinButton(“Button”).Click
Window(“Flight Reservation”).Dialog(“Open Order”).WinCheckBox(“Order No.”).Set
“ON”
Window(“Flight Reservation”).Dialog(“Open Order”).WinEdit(“Edit”).Set
Order_Number
Window(“Flight Reservation”).Dialog(“Open Order”).WinButton(“OK”).Click
OrdNum = Window(“Flight Reservation”).WinEdit(“Order No:”).GetVisibleText()
OrdNum=CInt(OrdNum)
If OrdNum=Order_Number Then
Open_Order= Order_Number& ” Opened sucessfully”
Msgbox Open_Order
Else
Open_Order= Order_Number& ” Not Opened”
Msgbox Open_Order
End If
End Function
——————————————

vii) Update Order In Flight Reservation Application

Function Update_Order(Tickets)
Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).WinButton(“Button”).Click


                               QTP Training                                       5
gcreddy@gcreddy.com

Window(“Flight Reservation”).Dialog(“Open Order”).WinCheckBox(“Order No.”).Set
“ON”
Window(“Flight Reservation”).Dialog(“Open Order”).WinEdit(“Edit”).Set “2″
Window(“Flight Reservation”).Dialog(“Open Order”).WinButton(“OK”).Click
Window(“Flight Reservation”).WinEdit(“Tickets:”).Set Tickets
Window(“Flight Reservation”).WinButton(“Update Order”).Click
Wait (10)
Message = Window(“Flight Reservation”).ActiveX(“Threed Panel
Control”).GetROProperty(“text”)

If Message=”Update Done…” Then
Update_Order=”Order Updated Sucessfully”
Msgbox Update_Order
Else
Update_Order=”Order Not Updated”
Msgbox Update_Order
End If
End Function
—————————————–

viii) ‘Write Function to Count how many Browsers opened on desktop
and close them all

Function Close_Browsers()
Dim oBrowser, Browsers, TotBrowsers, i
Set oBrowser=Description.Create
oBrowser(“micclass”).Value=”Browser”
Set Browsers=Desktop.ChildObjects(oBrowser)
TotBrowsers=Browsers.Count
Msgbox TotBrowsers
For i= 0 to TotBrowsers-1 Step 1
Browsers(i).close
Next
End Function
—————————

ix) ‘Write Function to Count how many Buttons available in FR Window

Function Count_Buttons()
Dim oButton, Buttons, TotButtons, i
Set oButton=Description.Create
oButton(“Class Name”).Value=”WinButton”
Set Buttons=Window(“text:=Flight Reservation”).ChildObjects(oButton)
TotButtons=Buttons.Count
Msgbox TotButtons
End Function
Call Count_Buttons()
—————————–

x) ‘Write Function to Count how many Objects available in FR Window
by specified Test Object class


                              QTP Training                                       6
gcreddy@gcreddy.com

Function Count_Objects(Object)
Dim obj, Objects, TotObjects, i
Set obj=Description.Create
obj(“Class Name”).Value=Object
Set Objects=Window(“text:=Flight Reservation”).ChildObjects(obj)
TotObjects=Objects.Count
Msgbox TotObjects
End Function
Call Count_Objects(“WinRadioButton”)
Call Count_Objects(“WinButton”)
Call Count_Objects(“WinEdit”)
Call Count_Objects(“WinComboBox”)
——————————–

xi) ‘Write function to capture all button names one by one from Login
Dialog Box

Function Capture_Buttons()
Dim oButton, Buttons, TotButtons, i, myButton
Set oButton=Description.Create
oButton(“Class Name”).Value=”WinButton”
Set Buttons=Dialog(“text:=Login”).ChildObjects(oButton)
TotButtons=Buttons.Count

For i= 0 to TotButtons-1
myButton=Buttons(i).GetRoProperty(“text”)
Msgbox myButton
Next
End Function
Call Capture_Buttons()
——————————————
xii) ‘Write function to Count Howmany Links available in Google
Homepage

Function Count_Links()
Dim oLink, Links, TotLinks, i
Set oLink=Description.Create
oLink(“micclass”).Value=”Link”
Set Links=Browser(“title:=Google”).Page(“title:=Google”).ChildObjects(oLink)
TotLinks=Links.Count
Msgbox TotLinks
End Function
Call Count_Links()

——————————————————————————-

Functions in QTP

User Defined Functions

Functions in VB Script


                               QTP Training                                    7
gcreddy@gcreddy.com




QTP Training                     8

Weitere ähnliche Inhalte

Was ist angesagt?

Spray Json and MongoDB Queries: Insights and Simple Tricks.
Spray Json and MongoDB Queries: Insights and Simple Tricks.Spray Json and MongoDB Queries: Insights and Simple Tricks.
Spray Json and MongoDB Queries: Insights and Simple Tricks.Andrii Lashchenko
 
BDD, ATDD, Page Objects: The Road to Sustainable Web Testing
BDD, ATDD, Page Objects: The Road to Sustainable Web TestingBDD, ATDD, Page Objects: The Road to Sustainable Web Testing
BDD, ATDD, Page Objects: The Road to Sustainable Web TestingJohn Ferguson Smart Limited
 
MongoDB World 2018: Time for a Change Stream - Using MongoDB Change Streams t...
MongoDB World 2018: Time for a Change Stream - Using MongoDB Change Streams t...MongoDB World 2018: Time for a Change Stream - Using MongoDB Change Streams t...
MongoDB World 2018: Time for a Change Stream - Using MongoDB Change Streams t...MongoDB
 
Ken 20150306 心得分享
Ken 20150306 心得分享Ken 20150306 心得分享
Ken 20150306 心得分享LearningTech
 
Building android apps with kotlin
Building android apps with kotlinBuilding android apps with kotlin
Building android apps with kotlinShem Magnezi
 
The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202Mahmoud Samir Fayed
 
What's new in iOS 7
What's new in iOS 7What's new in iOS 7
What's new in iOS 7barcelonaio
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventasDAYANA RETO
 
The Ring programming language version 1.4.1 book - Part 16 of 31
The Ring programming language version 1.4.1 book - Part 16 of 31The Ring programming language version 1.4.1 book - Part 16 of 31
The Ring programming language version 1.4.1 book - Part 16 of 31Mahmoud Samir Fayed
 
Selectors and normalizing state shape
Selectors and normalizing state shapeSelectors and normalizing state shape
Selectors and normalizing state shapeMuntasir Chowdhury
 
TDD in the wild
TDD in the wildTDD in the wild
TDD in the wildBrainhub
 
Vb Project ขั้นเทพ
Vb Project ขั้นเทพVb Project ขั้นเทพ
Vb Project ขั้นเทพSinchai Lanon
 
WaveEngine 2D components
WaveEngine 2D componentsWaveEngine 2D components
WaveEngine 2D componentswaveengineteam
 
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperTame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperGiordano Scalzo
 
Test and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppTest and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppMichele Capra
 

Was ist angesagt? (20)

Spray Json and MongoDB Queries: Insights and Simple Tricks.
Spray Json and MongoDB Queries: Insights and Simple Tricks.Spray Json and MongoDB Queries: Insights and Simple Tricks.
Spray Json and MongoDB Queries: Insights and Simple Tricks.
 
Javascript 2
Javascript 2Javascript 2
Javascript 2
 
BDD, ATDD, Page Objects: The Road to Sustainable Web Testing
BDD, ATDD, Page Objects: The Road to Sustainable Web TestingBDD, ATDD, Page Objects: The Road to Sustainable Web Testing
BDD, ATDD, Page Objects: The Road to Sustainable Web Testing
 
MongoDB World 2018: Time for a Change Stream - Using MongoDB Change Streams t...
MongoDB World 2018: Time for a Change Stream - Using MongoDB Change Streams t...MongoDB World 2018: Time for a Change Stream - Using MongoDB Change Streams t...
MongoDB World 2018: Time for a Change Stream - Using MongoDB Change Streams t...
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
 
Ken 20150306 心得分享
Ken 20150306 心得分享Ken 20150306 心得分享
Ken 20150306 心得分享
 
greenDAO
greenDAOgreenDAO
greenDAO
 
Building android apps with kotlin
Building android apps with kotlinBuilding android apps with kotlin
Building android apps with kotlin
 
The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202
 
What's new in iOS 7
What's new in iOS 7What's new in iOS 7
What's new in iOS 7
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventas
 
The Ring programming language version 1.4.1 book - Part 16 of 31
The Ring programming language version 1.4.1 book - Part 16 of 31The Ring programming language version 1.4.1 book - Part 16 of 31
The Ring programming language version 1.4.1 book - Part 16 of 31
 
Ac2
Ac2Ac2
Ac2
 
Selectors and normalizing state shape
Selectors and normalizing state shapeSelectors and normalizing state shape
Selectors and normalizing state shape
 
TDD in the wild
TDD in the wildTDD in the wild
TDD in the wild
 
Vb Project ขั้นเทพ
Vb Project ขั้นเทพVb Project ขั้นเทพ
Vb Project ขั้นเทพ
 
WaveEngine 2D components
WaveEngine 2D componentsWaveEngine 2D components
WaveEngine 2D components
 
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperTame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapper
 
Test and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppTest and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 App
 
Green dao
Green daoGreen dao
Green dao
 

Andere mochten auch

Manual Testing
Manual TestingManual Testing
Manual TestingG.C Reddy
 
Qtp commands
Qtp commandsQtp commands
Qtp commandsG.C Reddy
 
QTP 10 00 Guide
QTP 10 00 GuideQTP 10 00 Guide
QTP 10 00 GuideG.C Reddy
 
Qtp training in hyderabad
Qtp training in hyderabadQtp training in hyderabad
Qtp training in hyderabadG.C Reddy
 
Automation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadAutomation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadDurga Prasad
 
New features in qtp11
New features in qtp11New features in qtp11
New features in qtp11G.C Reddy
 
How Manual Testers Can Break into Automation Without Programming Skills
How Manual Testers Can Break into Automation Without Programming SkillsHow Manual Testers Can Break into Automation Without Programming Skills
How Manual Testers Can Break into Automation Without Programming SkillsRanorex
 
Manual Testing Notes
Manual Testing NotesManual Testing Notes
Manual Testing Notesguest208aa1
 
Qtp 92 Tutorial
Qtp 92 TutorialQtp 92 Tutorial
Qtp 92 Tutorialsasidhar
 
Manual Testing Material by Durgasoft
Manual Testing Material by DurgasoftManual Testing Material by Durgasoft
Manual Testing Material by DurgasoftDurga Prasad
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1Raghu Kiran
 
Testing documents
Testing documentsTesting documents
Testing documentssuhasreddy1
 
Manual QA Testing Interview Questions From H2KInfosys
Manual QA Testing Interview Questions From H2KInfosysManual QA Testing Interview Questions From H2KInfosys
Manual QA Testing Interview Questions From H2KInfosysH2kInfosys
 
Manual testing-training-institute-in-marathahalli
Manual testing-training-institute-in-marathahalliManual testing-training-institute-in-marathahalli
Manual testing-training-institute-in-marathahallisiyaram ray
 
Test Life Cycle - Manual Testing Concept.
Test Life Cycle - Manual Testing Concept.Test Life Cycle - Manual Testing Concept.
Test Life Cycle - Manual Testing Concept.guestf9bc
 
TESTING LIFE CYCLE PPT
TESTING LIFE CYCLE PPTTESTING LIFE CYCLE PPT
TESTING LIFE CYCLE PPTsuhasreddy1
 
Manual testing interview question by INFOTECH
Manual testing interview question by INFOTECHManual testing interview question by INFOTECH
Manual testing interview question by INFOTECHPravinsinh
 

Andere mochten auch (20)

Manual Testing
Manual TestingManual Testing
Manual Testing
 
Qtp commands
Qtp commandsQtp commands
Qtp commands
 
QTP 10 00 Guide
QTP 10 00 GuideQTP 10 00 Guide
QTP 10 00 Guide
 
Qtp training in hyderabad
Qtp training in hyderabadQtp training in hyderabad
Qtp training in hyderabad
 
Selenium Handbook
Selenium HandbookSelenium Handbook
Selenium Handbook
 
Qtp Scripts
Qtp ScriptsQtp Scripts
Qtp Scripts
 
Automation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadAutomation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabad
 
New features in qtp11
New features in qtp11New features in qtp11
New features in qtp11
 
How Manual Testers Can Break into Automation Without Programming Skills
How Manual Testers Can Break into Automation Without Programming SkillsHow Manual Testers Can Break into Automation Without Programming Skills
How Manual Testers Can Break into Automation Without Programming Skills
 
Manual Testing Notes
Manual Testing NotesManual Testing Notes
Manual Testing Notes
 
Qtp 92 Tutorial
Qtp 92 TutorialQtp 92 Tutorial
Qtp 92 Tutorial
 
Manual Testing Material by Durgasoft
Manual Testing Material by DurgasoftManual Testing Material by Durgasoft
Manual Testing Material by Durgasoft
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1
 
Testing documents
Testing documentsTesting documents
Testing documents
 
Manual QA Testing Interview Questions From H2KInfosys
Manual QA Testing Interview Questions From H2KInfosysManual QA Testing Interview Questions From H2KInfosys
Manual QA Testing Interview Questions From H2KInfosys
 
Manual testing-training-institute-in-marathahalli
Manual testing-training-institute-in-marathahalliManual testing-training-institute-in-marathahalli
Manual testing-training-institute-in-marathahalli
 
Test Life Cycle - Manual Testing Concept.
Test Life Cycle - Manual Testing Concept.Test Life Cycle - Manual Testing Concept.
Test Life Cycle - Manual Testing Concept.
 
Fresher testing cv
Fresher testing cvFresher testing cv
Fresher testing cv
 
TESTING LIFE CYCLE PPT
TESTING LIFE CYCLE PPTTESTING LIFE CYCLE PPT
TESTING LIFE CYCLE PPT
 
Manual testing interview question by INFOTECH
Manual testing interview question by INFOTECHManual testing interview question by INFOTECH
Manual testing interview question by INFOTECH
 

Ähnlich wie Functions

Google
GoogleGoogle
Googlesoon
 
Micro services from scratch - Part 1
Micro services from scratch - Part 1Micro services from scratch - Part 1
Micro services from scratch - Part 1Azrul MADISA
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface
 
Mozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSMozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSRobert Nyman
 
Introduction to Android Wear
Introduction to Android WearIntroduction to Android Wear
Introduction to Android WearPeter Friese
 
The Screenplay Pattern: Better Interactions for Better Automation
The Screenplay Pattern: Better Interactions for Better AutomationThe Screenplay Pattern: Better Interactions for Better Automation
The Screenplay Pattern: Better Interactions for Better AutomationApplitools
 
Java script browser objects 2
Java script browser objects 2Java script browser objects 2
Java script browser objects 2H K
 
The Many Ways to Build Modular JavaScript
The Many Ways to Build Modular JavaScriptThe Many Ways to Build Modular JavaScript
The Many Ways to Build Modular JavaScriptTim Perry
 
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)Spike Brehm
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyOren Farhi
 
Desenvolver para Chromecast
Desenvolver para ChromecastDesenvolver para Chromecast
Desenvolver para ChromecastPedro Veloso
 
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...IT Event
 

Ähnlich wie Functions (20)

Google
GoogleGoogle
Google
 
Micro services from scratch - Part 1
Micro services from scratch - Part 1Micro services from scratch - Part 1
Micro services from scratch - Part 1
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
 
Mozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSMozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJS
 
Introduction to Android Wear
Introduction to Android WearIntroduction to Android Wear
Introduction to Android Wear
 
The Screenplay Pattern: Better Interactions for Better Automation
The Screenplay Pattern: Better Interactions for Better AutomationThe Screenplay Pattern: Better Interactions for Better Automation
The Screenplay Pattern: Better Interactions for Better Automation
 
How to integrate with GPII
How to integrate with GPIIHow to integrate with GPII
How to integrate with GPII
 
Javascript1
Javascript1Javascript1
Javascript1
 
Java script browser objects 2
Java script browser objects 2Java script browser objects 2
Java script browser objects 2
 
The Many Ways to Build Modular JavaScript
The Many Ways to Build Modular JavaScriptThe Many Ways to Build Modular JavaScript
The Many Ways to Build Modular JavaScript
 
Qtp scripts
Qtp scriptsQtp scripts
Qtp scripts
 
Keyword driven testing in qtp
Keyword driven testing in qtpKeyword driven testing in qtp
Keyword driven testing in qtp
 
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected Journey
 
QTP with QualityCenter
QTP with  QualityCenterQTP with  QualityCenter
QTP with QualityCenter
 
Code Management
Code ManagementCode Management
Code Management
 
Desenvolver para Chromecast
Desenvolver para ChromecastDesenvolver para Chromecast
Desenvolver para Chromecast
 
End-to-end testing with geb
End-to-end testing with gebEnd-to-end testing with geb
End-to-end testing with geb
 
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
 
Biwug
BiwugBiwug
Biwug
 

Mehr von G.C Reddy

QTP Training
QTP TrainingQTP Training
QTP TrainingG.C Reddy
 
Software+struc+doc
Software+struc+docSoftware+struc+doc
Software+struc+docG.C Reddy
 
Qtp (advanced)
Qtp (advanced)Qtp (advanced)
Qtp (advanced)G.C Reddy
 
Qtp (basics to advanced)
Qtp (basics to advanced)Qtp (basics to advanced)
Qtp (basics to advanced)G.C Reddy
 
Object Repository
Object RepositoryObject Repository
Object RepositoryG.C Reddy
 
Advanced Qtp
Advanced QtpAdvanced Qtp
Advanced QtpG.C Reddy
 
Advanced Qtp Book
Advanced Qtp BookAdvanced Qtp Book
Advanced Qtp BookG.C Reddy
 
File System Operations
File System OperationsFile System Operations
File System OperationsG.C Reddy
 
Web Dictionary
Web DictionaryWeb Dictionary
Web DictionaryG.C Reddy
 

Mehr von G.C Reddy (13)

Html
HtmlHtml
Html
 
QTP Training
QTP TrainingQTP Training
QTP Training
 
Software+struc+doc
Software+struc+docSoftware+struc+doc
Software+struc+doc
 
Qtp (advanced)
Qtp (advanced)Qtp (advanced)
Qtp (advanced)
 
Qtp (basics to advanced)
Qtp (basics to advanced)Qtp (basics to advanced)
Qtp (basics to advanced)
 
Object Repository
Object RepositoryObject Repository
Object Repository
 
Advanced Qtp
Advanced QtpAdvanced Qtp
Advanced Qtp
 
Advanced Qtp Book
Advanced Qtp BookAdvanced Qtp Book
Advanced Qtp Book
 
File System Operations
File System OperationsFile System Operations
File System Operations
 
Qtp Faq
Qtp FaqQtp Faq
Qtp Faq
 
Qtp Summary
Qtp SummaryQtp Summary
Qtp Summary
 
Qtp Scripts
Qtp ScriptsQtp Scripts
Qtp Scripts
 
Web Dictionary
Web DictionaryWeb Dictionary
Web Dictionary
 

Kürzlich hochgeladen

(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一C SSS
 
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一C SSS
 
existing product research b2 Sunderland Culture
existing product research b2 Sunderland Cultureexisting product research b2 Sunderland Culture
existing product research b2 Sunderland CultureChloeMeadows1
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)861c7ca49a02
 
毕业文凭制作#回国入职#diploma#degree加拿大瑞尔森大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree加拿大瑞尔森大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree加拿大瑞尔森大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree加拿大瑞尔森大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree z zzz
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Servicesnajka9823
 
the cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptxthe cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptxLeaMaePahinagGarciaV
 
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作ss846v0c
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRdollysharma2066
 
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls in Delhi
 
Hindu amil baba kala jadu expert in pakistan islamabad lahore karachi atar ...
Hindu amil baba kala jadu expert  in pakistan islamabad lahore karachi atar  ...Hindu amil baba kala jadu expert  in pakistan islamabad lahore karachi atar  ...
Hindu amil baba kala jadu expert in pakistan islamabad lahore karachi atar ...amilabibi1
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...ttt fff
 
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作f3774p8b
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degreeyuu sss
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程1k98h0e1
 
RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作f3774p8b
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一diploma 1
 

Kürzlich hochgeladen (20)

(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一
 
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
 
existing product research b2 Sunderland Culture
existing product research b2 Sunderland Cultureexisting product research b2 Sunderland Culture
existing product research b2 Sunderland Culture
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
 
毕业文凭制作#回国入职#diploma#degree加拿大瑞尔森大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree加拿大瑞尔森大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree加拿大瑞尔森大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree加拿大瑞尔森大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
 
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Serviceyoung call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
 
the cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptxthe cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptx
 
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
 
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
 
Hindu amil baba kala jadu expert in pakistan islamabad lahore karachi atar ...
Hindu amil baba kala jadu expert  in pakistan islamabad lahore karachi atar  ...Hindu amil baba kala jadu expert  in pakistan islamabad lahore karachi atar  ...
Hindu amil baba kala jadu expert in pakistan islamabad lahore karachi atar ...
 
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
young call girls in  Khanpur,🔝 9953056974 🔝 escort Serviceyoung call girls in  Khanpur,🔝 9953056974 🔝 escort Service
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
 
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程
 
RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
 

Functions

  • 1. gcreddy@gcreddy.com User Defined Functions Visit: www.gcreddy.com for QTP Scripts ---------------------------------------------------------- i) Launching Application Navigation: a) Launch the Browser b) Enter / Select the URL (“www.jjperfumes.com”) Verification: Capture the Browser Name and Verify ————— Function Launch_App() SystemUtil.Run “C:Program FilesInternet ExplorerIEXPLORE.EXE”,”",”C:Documents and SettingsAdministrator”,”open” Browser(“Google”).Page(“Google”).Sync Browser(“Google”).Navigate “http://www.jjperfumes.com/” Wait (8) Browser_Name = Browser(“Google”).GetROProperty(“title”) If Browser_Name=”JJ Perfumes-Discount perfume cheap brand name perfumes, fragrance & cologne online” Then Launch_App=”Jjperumes.com Browser Launched Sucessfully” Msgbox Launch_App Else Launch_App=”Jjperumes.com Browser Not Launched” Msgbox Launch_App End If End Function ——————————————————————————————– ii) Customer Registration Pre-Setup: Launching Application QTP Training 1
  • 2. gcreddy@gcreddy.com Navigation: a) Select Registration Link in jjperfumes.com homepage b) Enter all Mandatory details c) Select Submit button Verify: Capture confirmation Message and Verify Function Register(Email) Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume”).Link(“Register”).Click Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebList(“usertype”).Select “Retailer” Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“firstname”).Set “dfgdg” Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“lastname”).Set “dgdfgdfg” Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebList(“gender”).Select “Male” Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“address1″).Set “dfgfdgf” Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“phone”).Set “9222222223″ Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“email”).Set Email Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“city”).Set “chennai” Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebList(“state”).Select “MS – MISSISSIPPI” Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“zip”).Set “23456″ Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“password”).SetSecure “3c30bbc7daa0dccb83c2941bb87fa0709d34″ Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“conPass”).SetSecure “3c30bbcdb1f7a32d27a56f70a60f7d1e4159″ Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebButton(“Submit”).Click Wait (5) Confirm_Message = Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes- Discount perfume_3″).WebElement(“Registered successfully.”).GetROProperty(“innertext”) If Confirm_Message=”Registered successfully. “Then Register=”Customer Registration Sucessful” Msgbox Register Else Register=”Registration Failed” Msgbox Register End If End Function QTP Training 2
  • 3. gcreddy@gcreddy.com ——————- Function Register(Email) Set myBrowser=Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes- Discount perfume_2″) Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume”).Link(“Register”).Click myBrowser.WebList(“usertype”).Select “Retailer” myBrowser.WebEdit(“firstname”).Set “dfgdg” myBrowser.WebEdit(“lastname”).Set “dgdfgdfg” myBrowser.WebList(“gender”).Select “Male” myBrowser.WebEdit(“address1″).Set “dfgfdgf” myBrowser.WebEdit(“phone”).Set “9222222223″ myBrowser.WebEdit(“email”).Set Email myBrowser.WebEdit(“city”).Set “chennai” myBrowser.WebList(“state”).Select “MS – MISSISSIPPI” myBrowser.WebEdit(“zip”).Set “23456″ myBrowser.WebEdit(“password”).SetSecure “3c30bbc7daa0dccb83c2941bb87fa0709d34″ myBrowser.WebEdit(“conPass”).SetSecure “3c30bbcdb1f7a32d27a56f70a60f7d1e4159″ myBrowser.WebButton(“Submit”).Click Wait (5) Confirm_Message = Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes- Discount perfume_3″).WebElement(“Registered successfully.”).GetROProperty(“innertext”) If Confirm_Message=”Registered successfully. “Then Register=”Customer Registration Sucessful” Msgbox Register Else Register=”Registration Failed” Msgbox Register End If End Function iii) Login Operation Pre-Requisites: a) Launching Application b) Customer Registration Navigation: a) Select “Login” Link in jjperfumes.com homepage b) Enter Email and Password c) Select “Login Button” Verify: Check existence of LogOut Link —————– QTP Training 3
  • 4. gcreddy@gcreddy.com Function Login(Email, Pwd) Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume”).Link(“Login”).Click Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“username”).Set Email Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebEdit(“password”).Set Pwd Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_2″).WebButton(“Login”).Click If Browser(“JJ Perfumes-Discount perfume”).Page(“JJ Perfumes-Discount perfume_3″).Link(“Logout”).Exist(10) Then Login=”Login Operation Sucessful” Msgbox Login Else Login=”Login Failed” Msgbox Login End If End Function iv) Closing Application ———————— Navigation: ———— a) Check the Existence of jjperfumes.com Browser b) Close the Browser window (If exists) —————– Function Launch_App() SystemUtil.Run “C:Program FilesInternet ExplorerIEXPLORE.EXE”,”",”C:Documents and SettingsAdministrator”,”open” Browser(“Google”).Page(“Google”).Sync Browser(“Google”).Navigate “http://www.jjperfumes.com/” Wait (8) Browser_Name = Browser(“Google”).GetROProperty(“title”) If Browser_Name=”JJ Perfumes-Discount perfume cheap brand name perfumes, fragrance & cologne online” Then Launch_App=”Jjperumes.com Browser Launched Sucessfully” Msgbox Launch_App Else Launch_App=”Jjperumes.com Browser Not Launched” Msgbox Launch_App End If End Function ********************************************************** v) Login Operation In Flight Reservation Application QTP Training 4
  • 5. gcreddy@gcreddy.com Function Login (Agent, Password) SystemUtil.Run “C:Program FilesHPQuickTest Professionalsamplesflightappflight4a.exe”,”",”C:Program FilesHPQuickTest Professionalsamplesflightapp”,”open” Dialog(“Login”).Activate Dialog(“Login”).WinEdit(“Agent Name:”).Set Agent Dialog(“Login”).WinEdit(“Password:”).Set Password wait 2 Dialog(“Login”).WinButton(“OK”).Click If Window(“Flight Reservation”).Exist(12) Then Window(“Flight Reservation”).Close Login=”Login Operation Sucessful” Msgbox Login Else SystemUtil.CloseDescendentProcesses ‘If Dialog(“Login”).Dialog(“Flight Reservations”).Exist(2) Then ‘Dialog(“Login”).Dialog(“Flight Reservations”).WinButton(“OK”).Click ‘Dialog(“Login”).WinButton(“Cancel”).Click ‘End if Login=”Login Failed” Msgbox Login End if End Function ——————————— vi) Open Order In Flight Reservation Application Function Open_Order(Order_Number) Window(“Flight Reservation”).Activate Window(“Flight Reservation”).WinButton(“Button”).Click Window(“Flight Reservation”).Dialog(“Open Order”).WinCheckBox(“Order No.”).Set “ON” Window(“Flight Reservation”).Dialog(“Open Order”).WinEdit(“Edit”).Set Order_Number Window(“Flight Reservation”).Dialog(“Open Order”).WinButton(“OK”).Click OrdNum = Window(“Flight Reservation”).WinEdit(“Order No:”).GetVisibleText() OrdNum=CInt(OrdNum) If OrdNum=Order_Number Then Open_Order= Order_Number& ” Opened sucessfully” Msgbox Open_Order Else Open_Order= Order_Number& ” Not Opened” Msgbox Open_Order End If End Function —————————————— vii) Update Order In Flight Reservation Application Function Update_Order(Tickets) Window(“Flight Reservation”).Activate Window(“Flight Reservation”).WinButton(“Button”).Click QTP Training 5
  • 6. gcreddy@gcreddy.com Window(“Flight Reservation”).Dialog(“Open Order”).WinCheckBox(“Order No.”).Set “ON” Window(“Flight Reservation”).Dialog(“Open Order”).WinEdit(“Edit”).Set “2″ Window(“Flight Reservation”).Dialog(“Open Order”).WinButton(“OK”).Click Window(“Flight Reservation”).WinEdit(“Tickets:”).Set Tickets Window(“Flight Reservation”).WinButton(“Update Order”).Click Wait (10) Message = Window(“Flight Reservation”).ActiveX(“Threed Panel Control”).GetROProperty(“text”) If Message=”Update Done…” Then Update_Order=”Order Updated Sucessfully” Msgbox Update_Order Else Update_Order=”Order Not Updated” Msgbox Update_Order End If End Function —————————————– viii) ‘Write Function to Count how many Browsers opened on desktop and close them all Function Close_Browsers() Dim oBrowser, Browsers, TotBrowsers, i Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser” Set Browsers=Desktop.ChildObjects(oBrowser) TotBrowsers=Browsers.Count Msgbox TotBrowsers For i= 0 to TotBrowsers-1 Step 1 Browsers(i).close Next End Function ————————— ix) ‘Write Function to Count how many Buttons available in FR Window Function Count_Buttons() Dim oButton, Buttons, TotButtons, i Set oButton=Description.Create oButton(“Class Name”).Value=”WinButton” Set Buttons=Window(“text:=Flight Reservation”).ChildObjects(oButton) TotButtons=Buttons.Count Msgbox TotButtons End Function Call Count_Buttons() —————————– x) ‘Write Function to Count how many Objects available in FR Window by specified Test Object class QTP Training 6
  • 7. gcreddy@gcreddy.com Function Count_Objects(Object) Dim obj, Objects, TotObjects, i Set obj=Description.Create obj(“Class Name”).Value=Object Set Objects=Window(“text:=Flight Reservation”).ChildObjects(obj) TotObjects=Objects.Count Msgbox TotObjects End Function Call Count_Objects(“WinRadioButton”) Call Count_Objects(“WinButton”) Call Count_Objects(“WinEdit”) Call Count_Objects(“WinComboBox”) ——————————– xi) ‘Write function to capture all button names one by one from Login Dialog Box Function Capture_Buttons() Dim oButton, Buttons, TotButtons, i, myButton Set oButton=Description.Create oButton(“Class Name”).Value=”WinButton” Set Buttons=Dialog(“text:=Login”).ChildObjects(oButton) TotButtons=Buttons.Count For i= 0 to TotButtons-1 myButton=Buttons(i).GetRoProperty(“text”) Msgbox myButton Next End Function Call Capture_Buttons() —————————————— xii) ‘Write function to Count Howmany Links available in Google Homepage Function Count_Links() Dim oLink, Links, TotLinks, i Set oLink=Description.Create oLink(“micclass”).Value=”Link” Set Links=Browser(“title:=Google”).Page(“title:=Google”).ChildObjects(oLink) TotLinks=Links.Count Msgbox TotLinks End Function Call Count_Links() ——————————————————————————- Functions in QTP User Defined Functions Functions in VB Script QTP Training 7