error after adding in code to changing browsers/ see attached SS

13 views
Skip to first unread message

Janine Traver

unread,
Feb 25, 2017, 2:20:54 PM2/25/17
to Selenium Users
Screenshot 2017-02-25 12.12.33.png
Auto Generated Inline Image 1

ramanak...@gmail.com

unread,
Feb 26, 2017, 12:37:07 PM2/26/17
to Selenium Users

Hi Janine,

Looks like you have not initialized the WebDriver. Please initialize the WebDriver as class variable.
    public static WebDriver driver = null;

Also, if you have initialized the "WebDriver" as class variable then please create the browser instance like this.

driver = new ChromeDriver(); / driver = new FirefoxDriver(); / etc.,


Regards,
Kumar
On Saturday, February 25, 2017 at 1:20:54 PM UTC-6, Janine Traver wrote:
Reply all
Reply to author
Forward
0 new messages