Java 类org.openqa.selenium.server.cli.RemoteControlLauncher 实例源码

项目:sulfur    文件:SWebDriverFactoryAndSeleniumHubTest.java   
@Override
public void run() {
    try {
        // Start the Selenium Server
        System.setProperty("org.openqa.jetty.http.HttpRequest.maxFormContentSize", "0");
        mSeleniumServer = new SeleniumServer(
                false,                                                          //< no slow resources
                RemoteControlLauncher.parseLauncherOptions(new String[] {}));   //< options
        mSeleniumServer.boot();

        // Enter in a "while loop" waiting for the Server to be not running anymore
        mRunning = true;
        while (mRunning) { /* nothing to do - the Selenium Server is running */}

        // Stop the actual Selenium server
        mSeleniumServer.stop();
    } catch (Exception e) {
        e.printStackTrace();
    }
}