• RSS
  • Facebook
  • Twitter

One Center for all the Testing Need. OneTestingCenter is for all, for all QA, for all Automation. Automation is easy, fun and enriching experience. Happy Learning and Happy Testing!

  • Access to All QA

    At OneTestingCenter, you find lots of books,articles,blogs and detailed guides. Everyone has access to QA. Happy Learning, Happy Testing.

  • Global Trainings

    All the QA/Auotmation trainings are available at OneTestingCenter. QA, Automation, QTP/UFT, Selenium, LoadRunner, QC/ALM, Appium...

  • Automation Learning Fun

    Technology is always evolving. Automation is always challenging. To be frank, Automation is fun, enthusiastic and enrching experience.



    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


    Reactions:

    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