package org.openqa.selenium.safari;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.testing.JUnit4TestBase;

import org.junit.Before;

public class SafariTestBase extends JUnit4TestBase {

  private static WebDriver staticDriver = null;

  @Before
  @Override
  public void createDriver() {
    driver = actuallyCreateDriver(DesiredCapabilities.safari());
  }

  public static WebDriver actuallyCreateDriver(Capabilities capabilities) {
    if (staticDriver == null) {
      staticDriver = new SafariDriver(capabilities);
    }
    return staticDriver;
  }
  
  public static void quitDriver() {
    if (staticDriver != null) {
      staticDriver.quit();
      staticDriver = null;
    }
  }
}

@@ -156,32 +156,85 @@
 edCapabilities;%0A
+import org.openqa.selenium.support.ui.WebDriverWait;%0A
 import org.openq
@@ -516,16 +516,104 @@
 ari());%0A
+    wait = new WebDriverWait(driver, 30);%0A    shortWait = new WebDriverWait(driver, 5);%0A
   %7D%0A%0A  p

Fix NPE