Here I am taking an Example of W3 Schools Site, in this website we have webtable like vbscript functions.
Here I am taking an example of W3schools web application
Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe"
Browser("Google").Navigate "www.w3schools.com"
Browser("Google").Page("W3Schools Online Web Tutorials").Link("Learn VBScript").Click
Browser("Google").Page("VBScript Tutorial").Link("VB Functions").Click
rCount = Browser("Google").Page("VBScript Functions").WebTable("Function").RowCount
For i = 2 to rCount
cCount = Browser("Google").Page("VBScript Functions").WebTable("Function").ColumnCount(i)
sData1 = Browser("Google").Page("VBScript Functions").WebTable("Function").GetCellData(i,1)
sData2 = Browser("Google").Page("VBScript Functions").WebTable("Function").GetCellData(i,2)
DataTable("Function",dtGlobalSheet) = sData1
DataTable("Description",dtGlobalSheet) = sData2
DataTable.SetCurrentRow(i)
Next
Here I am taking an example of W3schools web application
Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe"
Browser("Google").Navigate "www.w3schools.com"
Browser("Google").Page("W3Schools Online Web Tutorials").Link("Learn VBScript").Click
Browser("Google").Page("VBScript Tutorial").Link("VB Functions").Click
rCount = Browser("Google").Page("VBScript Functions").WebTable("Function").RowCount
For i = 2 to rCount
cCount = Browser("Google").Page("VBScript Functions").WebTable("Function").ColumnCount(i)
sData1 = Browser("Google").Page("VBScript Functions").WebTable("Function").GetCellData(i,1)
sData2 = Browser("Google").Page("VBScript Functions").WebTable("Function").GetCellData(i,2)
DataTable("Function",dtGlobalSheet) = sData1
DataTable("Description",dtGlobalSheet) = sData2
DataTable.SetCurrentRow(i)
Next