package org.openqa.selenium.testing.drivers;

import com.google.common.base.Supplier;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriver;

public class SauceBackedDriverSupplier implements Supplier<WebDriver> {

  private final Capabilities capabilities;

  public SauceBackedDriverSupplier(Capabilities caps) {
    this.capabilities = caps;
  }

  public WebDriver get() {
    if (!SauceDriver.shouldUseSauce()) {
      return null;
    }

    return new SauceDriver(capabilities);
  }
}

@@ -158,16 +158,69 @@
 bDriver;
+%0Aimport org.openqa.selenium.remote.LocalFileDetector;
 %0A%0Apublic
@@ -519,22 +519,36 @@
  %7D%0A%0A    
-return
+SauceDriver driver =
  new Sau
@@ -571,14 +571,86 @@
 ities);%0A
+    driver.setFileDetector(new LocalFileDetector());%0A    return driver;%0A
   %7D%0A%7D%0A

Use a file detector for Sauce tests