Forum Discussion

akash10's avatar
akash10
Occasional Contributor
10 years ago

RowCount & Column Count for a Table in a Web Page (For QlikView Application)

Hello,

 

Could anyone provide help how to get rows count for a Table in a Webpage(What Method or property need to select) and also How to read those records using VBScript.

 

I need to compare Tabular data from web page with excel File

 

Please find below the link for an application that I am referring to get the Tabular data.

 

http://esqvdev/QvAJAXZfc/opendoc.htm?document=FX%2FTestComplete_Demo.qvw

 

Thanks

Akash Maheshwari

  • Link doesn't work. (looks like a link to an internal dev environment to me?)

     

      • dganov's avatar
        dganov
        Staff

        You can iterate the grid lines using corresponding script object attached to the DIV element with QvGrid class on the web page:

         

        function test()
        {
          var grid = Sys.Browser().Page("http://us-b.demo.qlik.com/*").Panel("PageContainer").Panel("MainContainer").Panel(62).Panel(1).Panel(0);
          for (var i = 0; i < 10 /* grid.Mgr.Body.Lines.length */; i++)
            for (var j = 0; j < grid.Mgr.Body.Lines[i].length; j++)
              Log.Message(grid.Mgr.Body.Lines[i][j].val);
        }

        This script posts cell values of the first 10 lines of the grid into the TestComplete log.