Forum Discussion
In concept web page table should not be too different from Windows forms table, and following this example you should be able to manipulate it. You only need to figure out your available similar properties for ColumnIndex and RowIndex.
Access https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_intro
On Project level variables add the following string variables:
ColumnName
ColumnIndex
RowIndex
In NameMapping map the following nodes under NameMapping.Sys.browser.pageW3schoolsTryitEditor.frameIframeresult
column with XPath=//th[.='%ColumnName%']
row with XPath=//tr[%RowIndex%]/td[%ColumnIndex%]
Now you can test it with this code, modify the ColumnName and RowIndex to your choosing
def Test1():
Var1 = 0
Browsers.Item[btChrome].Run("https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_intro")
Aliases.browser.pageW3schoolsTryitEditor.Wait()
Aliases.browser.pageW3schoolsTryitEditor.frameIframeresult.RefreshMappingInfo()
Project.Variables.ColumnName = "Contact"
Project.Variables.RowIndex = "3"
Var1 = Aliases.browser.pageW3schoolsTryitEditor.frameIframeresult.column.ColumnIndex
Project.Variables.ColumnIndex = Var1 + 1
Log.Message(Aliases.browser.pageW3schoolsTryitEditor.frameIframeresult.row.contentText, "")
P.S. if you like my post give a like, and if it solved your problem mark it as solution to give credit.