Micro Focus QTP (UFT) Forums
Link in a webtable in a webtable - 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: Link in a webtable in a webtable (/Thread-Link-in-a-webtable-in-a-webtable)



Link in a webtable in a webtable - Soulwalker - 07-18-2017

Hi there,

I'd need your help because I can't get rid of an error message.

Given is a dynamic changing webtable, its cells are webtables as well, each cells contain one link I'd like to click on.


Code:
Set WebTableDescription = Description.Create
WebTableDescription("html tag").value = "TABLE"
Set TableRow = Page("page").WebTable("list").ChildObjects(WebTableDescription)
TableRow(10).ChildItem(1, 2, "Link", 0).Click


But UFT tells:

Code:
General run error.
Line (49): "TableRow(10).ChildItem(1, 2, "Link", 0).Click"


The error number is 2147467259 but I couldn't find a solution. 

It would be very nice if somebody could help: )


RE: Link in a webtable in a webtable - Ankur - 07-19-2017

First identify the TableRow uniquely and then use this syntax.


Code:
TableRow.ChildItem(1, 2, "Link", 0).Click