04-05-2011, 09:29 PM
I see two potential problems, without knowing exactly where it's blowing up as Basanth pointed out.
Our web tables aren't always consistent. i.e., just because row 1 has 6 columns that doesn't mean that row 5 also has 6 columns. I don't think HTML requires you to have the same number of <TD> tags in each row of a table. If table(row,col_cnt) doesn't exist, you'll get an error on the line that does "Trim(Workspace)". I think (but can't remember off the top of my head) that calling CellData(x,y) where x or y is out-of-bounds will result in a QTP error.
The other thing I see that could be a problem is if "Browser("").Page("").Frame("").WebTable("").ChildItem(i,1,"WebCheckBox",0)" doesn't exist. Then you'll get a null reference for "Workspace_Chk". In the next line, when you try to use "Workspace_Chk", you'll get an error. I suggest you do something like "if IsNull(Workspace_Chk) then" and log some error or exit the test.
Our web tables aren't always consistent. i.e., just because row 1 has 6 columns that doesn't mean that row 5 also has 6 columns. I don't think HTML requires you to have the same number of <TD> tags in each row of a table. If table(row,col_cnt) doesn't exist, you'll get an error on the line that does "Trim(Workspace)". I think (but can't remember off the top of my head) that calling CellData(x,y) where x or y is out-of-bounds will result in a QTP error.
The other thing I see that could be a problem is if "Browser("").Page("").Frame("").WebTable("").ChildItem(i,1,"WebCheckBox",0)" doesn't exist. Then you'll get a null reference for "Workspace_Chk". In the next line, when you try to use "Workspace_Chk", you'll get an error. I suggest you do something like "if IsNull(Workspace_Chk) then" and log some error or exit the test.