Micro Focus QTP (UFT) Forums
How to find which value is having link and which are all not having in Web table. - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to find which value is having link and which are all not having in Web table. (/Thread-How-to-find-which-value-is-having-link-and-which-are-all-not-having-in-Web-table)



How to find which value is having link and which are all not having in Web table. - Sivakumar2186@gmail.com - 10-09-2013

How to find which value is having link and which are all not having in Web table.


RE: How to find which value is having link and which are all not having in Web table. - supputuri - 10-11-2013

generally you can use the htmltag to check this. However, having a screenshot of the application which will cover both the cases link and non-link would helpful to provide more inputs from our side.


RE: How to find which value is having link and which are all not having in Web table. - Parke - 10-17-2013

Supputuri:

I assume you are asking how can you tell determine how may links are in a webtable.

I am not certain whose code I modified. Sorry.
Code:
''// Find_all_childobjects_of_a_webtable
''// do not know how this code will react if a cell has more than one object
''// for example a cell contains webedit and a link

Function objects_count_in_Page(Req_obj)
    Dim obj
    Set obj=Description.Create
    obj("micclass").Value=Req_obj
    Set x=Browser("name:="&browserName).Page("title:="&browserName).WebTable("name:="& tableName).ChildObjects(obj)
    Req_obj_count= x.count()
    print Req_obj&"s"&" in WebPage : "&Req_obj_count
    objects_count_in_Page = Req_obj_count
End Function

' If any web objects are missing, add them to the array
webObjects_arr = array("Link", "WebButton", "WebCheckBox", "WebEdit","WebElement", "WebTable", "Image", "WebList", "WebRadio", "WebRadioGroup")
' loop through the array to count how many of each type appears in the webtable
For i = 0 to ubound(webObjects_arr)
    Call objects_count_in_Page(webObjects_arr(i))
Next

hth,

Parke