Micro Focus QTP (UFT) Forums
Need help in automation of broken links in Application - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Need help in automation of broken links in Application (/Thread-Need-help-in-automation-of-broken-links-in-Application)



Need help in automation of broken links in Application - AutomationTester2011 - 11-22-2011

Hi

We are in process of automating sharepoint Application which has lot of Menus and Links using QTP , We are having issues :

1.Embedded links which are not visible on the page are also getting identified by QTP ( please let us know a way such that QTP wont identify them , tried class property & other properties of links)

Please let us know if you faced similar problems




RE: Need help in automation of broken links in Application - Gajre - 11-22-2011

Did you try using the visible property.
ex:
''******If you are trying for only one link object********
''Checking the existence and visible property simultaneously, use this your sure the link will exist for sure.
Code:
if Hierarchy.Link(abc).Exist and Hierarchy.Link(abc).GetRoProperty("visible") then
End if

'*****OR use the below code if your not sure of the link existence****
Code:
if Hierarchy.Link(abc).Exist then
if Hierarchy.Link(abc).GetRoProperty("visible") then
  'do your operrations
End if
End if

'*******Else if your trying to get link object collection********
''The above code gives the number of links visible in screen.
Code:
Set LinkObj = Description.Create
LinkObj("micclass").Value = "Link"
LinkObj("visible").Value = "True"

Set LinkObjColec = Hierarchy.ChildObjects(LinkObj)
msgbox LinkObjColec.count



RE: Need help in automation of broken links in Application - AutomationTester2011 - 11-23-2011

Thank you so much..the code was working with some changes