RE: java.lang.NullPointerException

When i trying to read the data from excel sheet and if that column is blank then webdriver throwing the error “java.lang.NullPointerException”.
So how to handle this error whenever column has no data?

onimje Default Asked on December 31, 2014 in Selenium WebDriver.
Add Comment
2 Answers

Hi onimje,

You would have something like this to address a cell in your code.

if this codition comes out to be true you will get a null pointer else you can perform what ever action you want on  the cell.


Professor Answered on December 31, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.