'####################################################
'# Descriptive Programming Objects
'####################################################
Public Sub DPWebEdit (strWebEdit,strInValue)
If strInValue
<> "" Then
Set obj_WebEdit =
Description.Create
obj_WebEdit
("Class Name").value = "WebEdit"
obj_WebEdit
("name").value= strWebEdit
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebEdit(obj_WebEdit).Set
strInValue
End If
End Sub
'########################################################
Public Sub DPWebEditSetSecure (strWebEdit,strInValue)
If strInValue
<> "" Then
Set obj_WebEdit =
Description.Create
obj_WebEdit
("Class Name").value = "WebEdit"
obj_WebEdit
("name").value= strWebEdit
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebEdit(obj_WebEdit).SetSecure
strInValue
End If
End Sub
'########################################################
Public Sub DPWebList (strWebList,strInValue)
If strInValue
<> "" Then
Set obj_WebList =
Description.Create
obj_WebList
("Class Name").value = "WebList"
obj_WebList
("name").value= strWebList
Reporter.Filter =
3 'Turn Reporting of
Call
TestListValues (obj_WebList,strInValue) 'Check for valid item in list
Reporter.Filter =
0 'Turn Reporting on
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebList(obj_WebList).Select
strInValue
End If
End Sub
'########################################################
Public Sub DPRadioGroup (strWebRadioGroup,strInValue)
Set
obj_WebRadioGroup = Description.Create
obj_WebRadioGroup
("Class Name").value = "WebRadioGroup"
obj_WebRadioGroup
("name").value= strWebRadioGroup
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebRadioGroup(obj_WebRadioGroup).Select
strInValue
End Sub
'####################################################
Public Sub DPWebImage (strImage)
Set obj_Image =
Description.Create
obj_Image
("Class Name").value = "Image"
obj_Image
("name").value= strImage
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).Image(obj_Image).Click
'6,7
End Sub
'####################################################
Public Sub DPWebCheckBox (strWebCheckBox,strInValue)
Set
obj_WebRadioGroup = Description.Create
obj_WebCheckBox
("Class Name").value = "WebCheckBox"
obj_WebCheckBox
("name").value= strWebRadioGroup
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebCheckBox(obj_WebCheckBox).Select
strInValue
End Sub
'####################################################
Public Sub DPWebLink (strWebLink)
Set obj_WebLink =
Description.Create
obj_WebLink
("Class Name").value = "Link"
obj_WebLink
("name").value= strWebLink
Count = 1
Do until
Browser(strBrowser).Page(strPage).Link(obj_WebLink).Exist
if
Browser(strBrowser).Page(strPage).Link(obj_WebLink).Exist Then
Exit
Do
End
If
Count = Count + 1
If
Count = 20 Then
Exit Do
end
if
Loop
Browser(strBrowser).Page(strPage).Link(obj_WebLink).Click
End Sub
'####################################################
Public Sub DPWebButton (strWebButton)
Set obj_WebButton =
Description.Create
obj_WebButton
("Class Name").value = "WebButton"
obj_WebButton
("name").value= strWebButton
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebButton(obj_WebButton).Click
End Sub
'####################################################
Subscribe to:
Posts (Atom)
eLearnQTP
Monday
QTP - Descriptive Programming
'####################################################
'# Descriptive Programming Objects
'####################################################
Public Sub DPWebEdit (strWebEdit,strInValue)
If strInValue
<> "" Then
Set obj_WebEdit =
Description.Create
obj_WebEdit
("Class Name").value = "WebEdit"
obj_WebEdit
("name").value= strWebEdit
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebEdit(obj_WebEdit).Set
strInValue
End If
End Sub
'########################################################
Public Sub DPWebEditSetSecure (strWebEdit,strInValue)
If strInValue
<> "" Then
Set obj_WebEdit =
Description.Create
obj_WebEdit
("Class Name").value = "WebEdit"
obj_WebEdit
("name").value= strWebEdit
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebEdit(obj_WebEdit).SetSecure
strInValue
End If
End Sub
'########################################################
Public Sub DPWebList (strWebList,strInValue)
If strInValue
<> "" Then
Set obj_WebList =
Description.Create
obj_WebList
("Class Name").value = "WebList"
obj_WebList
("name").value= strWebList
Reporter.Filter =
3 'Turn Reporting of
Call
TestListValues (obj_WebList,strInValue) 'Check for valid item in list
Reporter.Filter =
0 'Turn Reporting on
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebList(obj_WebList).Select
strInValue
End If
End Sub
'########################################################
Public Sub DPRadioGroup (strWebRadioGroup,strInValue)
Set
obj_WebRadioGroup = Description.Create
obj_WebRadioGroup
("Class Name").value = "WebRadioGroup"
obj_WebRadioGroup
("name").value= strWebRadioGroup
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebRadioGroup(obj_WebRadioGroup).Select
strInValue
End Sub
'####################################################
Public Sub DPWebImage (strImage)
Set obj_Image =
Description.Create
obj_Image
("Class Name").value = "Image"
obj_Image
("name").value= strImage
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).Image(obj_Image).Click
'6,7
End Sub
'####################################################
Public Sub DPWebCheckBox (strWebCheckBox,strInValue)
Set
obj_WebRadioGroup = Description.Create
obj_WebCheckBox
("Class Name").value = "WebCheckBox"
obj_WebCheckBox
("name").value= strWebRadioGroup
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebCheckBox(obj_WebCheckBox).Select
strInValue
End Sub
'####################################################
Public Sub DPWebLink (strWebLink)
Set obj_WebLink =
Description.Create
obj_WebLink
("Class Name").value = "Link"
obj_WebLink
("name").value= strWebLink
Count = 1
Do until
Browser(strBrowser).Page(strPage).Link(obj_WebLink).Exist
if
Browser(strBrowser).Page(strPage).Link(obj_WebLink).Exist Then
Exit
Do
End
If
Count = Count + 1
If
Count = 20 Then
Exit Do
end
if
Loop
Browser(strBrowser).Page(strPage).Link(obj_WebLink).Click
End Sub
'####################################################
Public Sub DPWebButton (strWebButton)
Set obj_WebButton =
Description.Create
obj_WebButton
("Class Name").value = "WebButton"
obj_WebButton
("name").value= strWebButton
Browser(strBrowser).page(strPage).Sync
Browser(strBrowser).Page(strPage).WebButton(obj_WebButton).Click
End Sub
'####################################################
Subscribe to:
Posts (Atom)
One Testing Center
ARRAY LIBRARY FUNCTIONS
Automation Learning Table
Core Testing FAQs
eLearnQTP: Get Object Properties Dynamically
Get Object Properties Dynamically
Most Relevant Features and Benefits of QTP
Pass ByRef and Pass ByVal : DEMO
Performance Testing Overview
QTP - Automation Startup
QTP - Descriptive Programming
QTP - Test : Action Template
QTP : Argument types in Functions
RGS - Testing Training
Swapping two numbers without a temporary variable
To Clear the browser caches : To Clear Temp files and folders : To Clear APP caches files
VB Script Features
Verify Object Is Enabled or Disabled
Manual Testing - ALL STUFF
- ARRAY LIBRARY FUNCTIONS
- Automation Learning Table
- Core Testing FAQs
- eLearnQTP: Get Object Properties Dynamically
- Get Object Properties Dynamically
- Most Relevant Features and Benefits of QTP
- Pass ByRef and Pass ByVal : DEMO
- Performance Testing Overview
- QTP - Automation Startup
- QTP - Descriptive Programming
- QTP - Test : Action Template
- QTP : Argument types in Functions
- RGS - Testing Training
- Swapping two numbers without a temporary variable
- To Clear the browser caches : To Clear Temp files and folders : To Clear APP caches files
- VB Script Features
- Verify Object Is Enabled or Disabled