[Httpunit-develop] ArrayIndexOutOfBoundsException using getCellAsText(x,y)
Brought to you by:
russgold
From: Pitre, R. <RP...@sh...> - 2004-09-29 16:26:27
|
I'm testing a webpage with dynamic content. I have a table 4w X 6h. The particular cell I'm testing is the LAST cell in a row 4. The cell contains the fax number for a particular company. If the value of the fax number in the database is null, no text is outputted to that cell. Basically, the cell is a blank cell with no text. When I run my test against a page with a null fax number, the test throws ArrayIndexOutOfBoundsException: 3. The actual html for that cell is <td></td>. I'm navigating and asserting the cell as such: WebTable table =3D response.getTableStartingWithPrefix("Info"); assertEquals("Fax numbers do not match.", fax, table.getCellAsText(3,3)); Any help much appreciated. |