One Testing Center

QTP - Keyword Driven Framework. QTP Learning Book - Learn By Questions. QTP Learning Book - Made Easy - Part1. QTP Learning Book - Made Easy - Part2. QTP Quality Center - QC.

QTP - Frameworks

QTP - Frameworks. Record and Play back Framework. Action Driven Framework. Data Driven Framework. Functional Decomposition Framework. Keyword Driven Framework. Hybrid Framework. Test Driven Framework.

QTP - Automation

QTP - Basics. QTP - Intermediate. QTP - Advanced. QTP - Frameworks.

QTP - Training

Friends, Welcome to OneTestingCenter. I am HP Functional Test ExportOne. I am HP Automation Functional Test Certified Professional. I am certified for HP Functional Test 11.x. Happy to share my knowledge.

QTP - Books

QTP - Keyword Driven Framework. QTP Learning Book - Learn By Questions. QTP Learning Book - Made Easy - Part1. QTP Learning Book - Made Easy - Part2. QTP Quality Center.

Recent Post

Showing posts with label QTP - GetTOProperties / GetTOProperty / SetTOProperty Demo. Show all posts
Showing posts with label QTP - GetTOProperties / GetTOProperty / SetTOProperty Demo. Show all posts

QTP @ GetTOProperties / GetTOProperty / SetTOProperty Demo

QTP @ GetTOProperties / GetTOProperty / SetTOProperty Demo


SystemUtil.Run "http://newtours.demoaut.com/"
wait(2)

'*******************************************
' Demo for the GetTOProperties()
'********************************************
'Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName")
Set MyEditProps=Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").GetTOProperties()
For i= 0 to MyEditProps.count-1
       strPropertyName=MyEditProps(i).Name
       strPropertyValue=MyEditProps(i).Value
       MsgBox "strPropertyName" &vbTab& strPropertyName &vbTab& "strPropertyValue"&vbTab& strPropertyValue
Next

'*******************************************
' Demo for the GetTOProperty()
'********************************************
MsgBox "Current Text of username:" &vbTab& (Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").GetTOProperty("text"))

Msgbox " Now I am assinging a new text value to the text property of the username"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").SetTOProperty "text","QuickTestQTP"
MsgBox "After Changing >> Current Text of username:" &vbTab& (Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").GetTOProperty("text"))

Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "GAReddy"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "PWD"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 16,5
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Link("Home").Click
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours_2").Link("SIGN-OFF").Click

'*******************************************
' Demo for the GetTOProperties()
'********************************************
Set MyLinkProps=Browser("Welcome: Mercury Tours").Page("Sign-on: Mercury Tours").Link("Home").GetTOProperties()
For i= 0 to MyLinkProps.count-1
       strPropertyName=MyLinkProps(i).Name
       strPropertyValue=MyLinkProps(i).Value
       MsgBox "strPropertyName" &vbTab& strPropertyName &vbTab& "strPropertyValue"&vbTab& strPropertyValue
Next

Browser("Welcome: Mercury Tours").Page("Sign-on: Mercury Tours").Link("Home").Click

 

GAReddy @ OneTestingCenter @ All Articles