package org.openqa.selenium.testing.drivers;

import com.google.common.base.Supplier;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.qtwebkit.QtWebDriverExecutor;
import org.openqa.selenium.qtwebkit.QtWebKitDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.LocalFileDetector;
import org.openqa.selenium.remote.RemoteWebDriver;
import java.net.URL;
import java.net.MalformedURLException;

public class QtWebKitDriverSupplier implements Supplier<WebDriver>{

    /**
     * System property that defines the IP of the launched WebDriver.
     */
    public static final String REMOTE_IP_PROPERTY = "RemoteIP";

    private Capabilities desiredCapabilities;
    private Capabilities requiredCapabilities;

    public QtWebKitDriverSupplier(Capabilities desiredCapabilities,
                          Capabilities requiredCapabilities) {
        this.desiredCapabilities = desiredCapabilities;
        this.requiredCapabilities = requiredCapabilities;
    }

    public WebDriver get() {
        if (desiredCapabilities == null ){
            System.out.println("Wrong capability was set!");
            Thread.dumpStack();
            return null;
        }

        if (!DesiredCapabilities.qtwebkit().getBrowserName().equals(desiredCapabilities.getBrowserName())) {
            System.out.println("Wrong capability was set!");
            Thread.dumpStack();
            return null;
        }

        String ip = System.getProperty(REMOTE_IP_PROPERTY);
        if (ip == null)
        {
            ip = "http://localhost:9517";
            System.setProperty(REMOTE_IP_PROPERTY, ip);

        }

        URL url;

        try {
            url = new URL(ip);
        }
        catch (MalformedURLException e) {
            throw new WebDriverException("The Node was run with wrong RemoteIP parameter!", e);
        }

        RemoteWebDriver driver = new QtWebKitDriver(new QtWebDriverExecutor(url), desiredCapabilities);
		driver.setFileDetector(new LocalFileDetector());

        return driver;
    }
}

@@ -1176,101 +1176,8 @@
  )%7B%0A
-            System.out.println(%22Wrong capability was set!%22);%0A            Thread.dumpStack();%0A
     
@@ -1321,101 +1321,8 @@
 ) %7B%0A
-            System.out.println(%22Wrong capability was set!%22);%0A            Thread.dumpStack();%0A
     

Delete useless log