• 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 - Descriptive Programming - Broken Link Checking
    OneTestingCenter @ QTP @ Descriptive Programming @ Broken Link Checking

    ' @@@@@@@@@@@@@@@@@@@@@@@@@@@@
    ' QTP – DP - Broken Link Checker tool for Any Web App
    ‘ Broken Link Check – Descriptive Programing
    '@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    On Error Resume Next

    Set oPage=Browser("name:=.*").Page("title:=.*")

    DataTable.AddSheet "dtLinkName"
    DataTable.GetSheet("dtLinkName").AddParameter "LinkName",""
    DataTable.GetSheet("dtLinkName").AddParameter "PageTitle",""

    Set oLink=Description.Create()
    oLink("micClass").value="Link"

    Set AllLinks=oPage.ChildObjects(oLink)
    PageTitle=oPage.GetROProperty("title")
    MsgBox "Total Number of links on the page: " &vbtab & PageTitle &vbtab & AllLinks.Count

    For i= 0 to AllLinks.Count-1
    DataTable.GetSheet("dtLinkName").SetCurrentRow(i+1)
    DataTable.Value("LinkName","dtLinkName")=AllLinks(i).GetROProperty("name")
    Next


    RC=DataTable.GetSheet("dtLinkName").GetRowCount
    For i= 1 to RC
    DataTable.GetSheet("dtLinkName").SetCurrentRow(i)
    LinkName=DataTable.Value("LinkName","dtLinkName")
    oPage.Link("name:="& LinkName).Click
    wait(2)
    MyPageTitle=oPage.GetROProperty("title")
    ' msgBox MyPageTitle
    DataTable.Value("PageTitle","dtLinkName")=MyPageTitle
    If MyPageTitle<>"404 Error Page" or MyPageTitle<>"500 Internal Server Error" or MyPageTitle<>"Page Can't be found"  and MyPageTitle=DataTable.Value() Then
    Reporter.ReportEvent micPass, "Link works good", "Clicked on Link" & LinKName
    Else
    Reporter.ReportEvent micFail, "Link does not work good", "Link is BROKEN " & LinKName
    End If
    Browser("name:=.*").Back
    ' SystemUtil.Run AppURL
    Wait(3)
    Next

    Reactions:

    QTP - Descriptive Programming - Broken Link Checking



    QTP - Descriptive Programming - Broken Link Checking
    OneTestingCenter @ QTP @ Descriptive Programming @ Broken Link Checking

    ' @@@@@@@@@@@@@@@@@@@@@@@@@@@@
    ' QTP – DP - Broken Link Checker tool for Any Web App
    ‘ Broken Link Check – Descriptive Programing
    '@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    On Error Resume Next

    Set oPage=Browser("name:=.*").Page("title:=.*")

    DataTable.AddSheet "dtLinkName"
    DataTable.GetSheet("dtLinkName").AddParameter "LinkName",""
    DataTable.GetSheet("dtLinkName").AddParameter "PageTitle",""

    Set oLink=Description.Create()
    oLink("micClass").value="Link"

    Set AllLinks=oPage.ChildObjects(oLink)
    PageTitle=oPage.GetROProperty("title")
    MsgBox "Total Number of links on the page: " &vbtab & PageTitle &vbtab & AllLinks.Count

    For i= 0 to AllLinks.Count-1
    DataTable.GetSheet("dtLinkName").SetCurrentRow(i+1)
    DataTable.Value("LinkName","dtLinkName")=AllLinks(i).GetROProperty("name")
    Next


    RC=DataTable.GetSheet("dtLinkName").GetRowCount
    For i= 1 to RC
    DataTable.GetSheet("dtLinkName").SetCurrentRow(i)
    LinkName=DataTable.Value("LinkName","dtLinkName")
    oPage.Link("name:="& LinkName).Click
    wait(2)
    MyPageTitle=oPage.GetROProperty("title")
    ' msgBox MyPageTitle
    DataTable.Value("PageTitle","dtLinkName")=MyPageTitle
    If MyPageTitle<>"404 Error Page" or MyPageTitle<>"500 Internal Server Error" or MyPageTitle<>"Page Can't be found"  and MyPageTitle=DataTable.Value() Then
    Reporter.ReportEvent micPass, "Link works good", "Clicked on Link" & LinKName
    Else
    Reporter.ReportEvent micFail, "Link does not work good", "Link is BROKEN " & LinKName
    End If
    Browser("name:=.*").Back
    ' SystemUtil.Run AppURL
    Wait(3)
    Next