Getting error while excuting the below code = Exception in thread "main" java.lang.NullPointerException : <p>/*
1538254052650   Marionette  DEBUG   [6442450945] Received DOM event pageshow for <a href="http://www.demo.guru99.com/v4/index.php" rel="nofollow noreferrer">http://www.demo.guru99.com/v4/index.php</a>
Exception in thread "main" java.lang.NullPointerException*/</p>

<p>public static void setUp() throws Exception {</p>

<pre><code>System.setProperty("webdriver.gecko.driver","D:\\\\Selenium\\\\New\\\\Driver('s)\\\\geckodriver.exe");

File pathBinary = new File("C:\\Program Files\\Mozilla Firefox\\firefox.exe");

FirefoxBinary firefoxBinary = new FirefoxBinary(pathBinary);  

DesiredCapabilities desired = DesiredCapabilities.firefox();

FirefoxOptions options = new FirefoxOptions();

desired.setCapability(FirefoxOptions.FIREFOX_OPTIONS, options.setBinary(firefoxBinary));

WebDriver driver = new FirefoxDriver(options);

driver.navigate().to("http://www.demo.guru99.com/v4/index.php");

driver.manage().window().maximize();

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

}

public static void main(String args[]) throws Exception {

    setUp();

    driver.findElement(By.name("uid")).sendKeys("mngr152686");

    driver.findElement(By.name("password")).sendKeys("YgabAzy");

    driver.findElement(By.name("btnLogin")).click();

    Thread.sleep(3000);

   System.out.println("Login Succsful");


}
</code></pre>
