• 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.

    '####################################################
    '# 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
    '####################################################

    Reactions:

    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
    '####################################################