Thursday, September 6, 2012

Selenium - java.lang.NullPointerException

Selenium - java.lang.NullPointerException

When do we get this exception?

If we don't initialize the driver object and start using it in the code we can notice this exception.
In the below screen shot I have commented the initialize code and started running the test, system displayed  NullPointerException. In my case, unknowing commented it while debugging the code.

When you get this king of exception, check the driver object initialization.


---
  

No comments:

Post a Comment