Passing same webdriver instance to other classes | Selenium Forum
M
Posted on 20/02/2016
Hi,

I want to pass the same webdriver instance to all the classes. I have created a base class and creating webdriver instsance in it, other classes are inheriting the base class. when I am running the code it is giving me Java null pointer exception - "java.lang.NullPointerException"

If I declare the webdriver object as static, it is working fine, but I don't want to declare webdriver object as static because I want to run my testcases in parallel using grid and static webdriver object gives problem while running through grid.

I require help in this issue!!

Thanks!

M
Replied on 20/02/2016

chk this q/a

http://stackoverflow.com/questions/14874494/testng-selenium-grid-2-not-running-tests-in-parallel