02-14-2008, 01:47 AM
Thanks for the quick response Ankur.
I updated my code based on ur suggestions.. as follows.
Here , var_col2 is returning correst response and var_col1 is returning 'empty'
In statement 2 above, the webTable -x has been added to Object repository and has the properties -html tag and index .And Smart Identification has been enabled (but not used )
In Statement 1 , I am using the exactly same properties to describe the object, but QTP returns - too many objects found with the same properties. I then added another property -"name" and I am still getting the same error. My GetIndex function is returning the correct value of index.
Could you please advise why the object is not identified in Statement 1 here?
Thanks much!
I updated my code based on ur suggestions.. as follows.
Code:
Function ValidateFields()
On Error Resume Next
Dim intIndex , intRowCt, intColCt, oTableObj,var_index, var_cols , intcount
Set oPage = Browser("xyz").Page("xyz")
intIndex = GetIndex("WebTable", oUSTPage)
Set oTableObj = oPage.WebTable("Index :="&intIndex , "html tag:=TABLE ", "name:=WebTable") //Statement 1
var_col1 = oTableObj.CokumnCount(1)
var_col2 = Browser("xyz").Page("xyz").WebTable("x").ColumnCount(1) //Statement 2
End Function
Here , var_col2 is returning correst response and var_col1 is returning 'empty'
In statement 2 above, the webTable -x has been added to Object repository and has the properties -html tag and index .And Smart Identification has been enabled (but not used )
In Statement 1 , I am using the exactly same properties to describe the object, but QTP returns - too many objects found with the same properties. I then added another property -"name" and I am still getting the same error. My GetIndex function is returning the correct value of index.
Could you please advise why the object is not identified in Statement 1 here?
Thanks much!