I'm getting the NullPointerException error when trying to access a table cell. I can find the number of rows and columns, but when I try to access any cell, or even convert the entire table to a string, I get the error. I'm using httpUnit1.3, and the error is below:
Time: 8.331
There was 1 error:
1) testGetCompany(tutorial.WSATest)
java.lang.NullPointerException
at com.meterware.httpunit.NodeUtils.convertNBSP(NodeUtils.java:117)
at com.meterware.httpunit.NodeUtils.asText(NodeUtils.java:90)
at com.meterware.httpunit.TableCell.getCellContentsAsText(TableCell.java:90)
at com.meterware.httpunit.TableCell.asText(TableCell.java:54)
at com.meterware.httpunit.WebTable.toString(WebTable.java:221)
at tutorial.WSATest.testGetCompany(WSATest.java:37)
at tutorial.WSATest.main(WSATest.java:12)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm getting the NullPointerException error when trying to access a table cell. I can find the number of rows and columns, but when I try to access any cell, or even convert the entire table to a string, I get the error. I'm using httpUnit1.3, and the error is below:
Time: 8.331
There was 1 error:
1) testGetCompany(tutorial.WSATest)
java.lang.NullPointerException
at com.meterware.httpunit.NodeUtils.convertNBSP(NodeUtils.java:117)
at com.meterware.httpunit.NodeUtils.asText(NodeUtils.java:90)
at com.meterware.httpunit.TableCell.getCellContentsAsText(TableCell.java:90)
at com.meterware.httpunit.TableCell.asText(TableCell.java:54)
at com.meterware.httpunit.WebTable.toString(WebTable.java:221)
at tutorial.WSATest.testGetCompany(WSATest.java:37)
at tutorial.WSATest.main(WSATest.java:12)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1