Ilakkk
3 years agoContributor
Web Table
Hi Team, I want to print the table in table format while in Log, but it prints like a single line all the table values. It's hard-to-understand table content so I want to print like table in Log. Is ...
A much better screenshot 👍
You're using innerText, you might want to use a different property, e.g. contentText.
Since you can't output null, you need to check whether the cell is not null, then output
You are looping through two rows? Tables have rows and columns, which you need to loop through.
For example, here's table
I can access the contents of each cell via Table("customers").Cell(0, 0), Table("customers").Cell(2, 1) etc where Cell(row, col) values.
Hi rraghvani, I have tried with contentText also it displays empty log while am using innerText only it shows row values. Still, I didn't find solution for this, because of same error in cell
exactly on for loop I have highlighted,
for(var t=0;t<table.rows.length;t++)
for(var u=0;u<table.row.item(t).cells.length;t++)
Log.message(table.row.item(t).cells.item(u).innerText); tried in debug for cell is Cells is not defined
and also am having n no.of tables in the current page. I think for cell value it gets confused
Give me exact solution plz rraghvani