Micro Focus QTP (UFT) Forums
unable to rowcount 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: unable to rowcount in web table (/Thread-unable-to-rowcount-in-web-table)



unable to rowcount in web table - manoj84monu - 06-07-2016

Hi,

I have add object in object repository but qtp not highlighted object on the page.Then i have created object for web table as below.There are multiple table on the page. Please guide me.


Code for count number of rows in table.

Set opage= Browser("NuWave APERIOsuite").Page("NuWave APERIOsuite")
Set desobj = Description.Create()
desobj("micclass").Value="WebTable"
desobj("html tag").Value="Table"
desobj("index").Value="3"
Set Tcount=opage.ChildObjects(desobj)
msgbox Tcount.RowCount



After run the code a error message pop up as below:

The test run cannot continue due to an unrecoverable error.

Object doesn't support this property or method: 'Tcount.RowCount'

Line (74): "msgbox Tcount.RowCount".


RE: unable to rowcount in web table - Anu1234 - 06-13-2016

(06-07-2016, 01:03 PM)Hi Manoj, Wrote:    Try below code
Set objPage = Browser("NuWave APERIOsuite").Page("NuWave APERIOsuite")
Set desobj= Description.Create
desobj("micclass").Value="WebTable"
desobj("html tag").Value="Table"
desobj("index").Value="3"
Set obj = objPage.ChildObjects(desobj)
'Verify whether .count is providing the required value 1, else alter your Descriptive pgmg values
obj.Count
'If count is returned as 1, they try for RowCount
Msgbox obj(0).RowCount
'To retrieve Column count of the perticular row, try
obj(0).ColumnCount(1)

Note - Couldn't takeout bold
 manoj84monuHi,

I have add object in object repository but qtp not highlighted object on the page.Then i have created object for web table as below.There are multiple table on the page. Please guide me.


Code for count number of rows in table.

Set opage= Browser("NuWave APERIOsuite").Page("NuWave APERIOsuite")
Set desobj = Description.Create()
desobj("micclass").Value="WebTable"
desobj("html tag").Value="Table"
desobj("index").Value="3"
Set Tcount=opage.ChildObjects(desobj)
msgbox Tcount.RowCount



After run the code a error message pop up as below:

The test run cannot continue due to an unrecoverable error.

Object doesn't support this property or method: 'Tcount.RowCount'

Line (74): "msgbox Tcount.RowCount".