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 - Descriptive Programming - Broken Link Checking. Show all posts
Showing posts with label QTP - Descriptive Programming - Broken Link Checking. Show all posts

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

GAReddy @ OneTestingCenter @ All Articles