Package org.openqa.selenium.server.htmlrunner

Examples of org.openqa.selenium.server.htmlrunner.HTMLLauncher


                results = "OK";
            } else {
                results = "ERROR: dir does not exist - " + dir.getAbsolutePath();
            }
        } else if ("runHTMLSuite".equals(cmd)) {
            HTMLLauncher launcher = new HTMLLauncher(remoteControl);
            File output = null;
            if (values.size() < 4) {
                results = "ERROR: Not enough arguments (browser, browserURL, suiteURL, multiWindow, [outputFile])";
            } else {
                if (values.size() > 4) {
                    output = new File(values.get(4));
                }
               
                try {
                    results = launcher.runHTMLSuite( values.get(0),  values.get(1),  values.get(2), output, remoteControl.getConfiguration().getTimeoutInSeconds(), "true".equals(values.get(3)));
                } catch (IOException e) {
                    e.printStackTrace();
                    results = e.toString();
                }
            }
View Full Code Here


                results = "OK";
            } else {
                results = "ERROR: dir does not exist - " + dir.getAbsolutePath();
            }
        } else if ("runHTMLSuite".equals(cmd)) {
            HTMLLauncher launcher = new HTMLLauncher(remoteControl);
            File output = null;
            if (values.size() < 4) {
                results = "ERROR: Not enough arguments (browser, browserURL, suiteURL, multiWindow, [outputFile])";
            } else {
                if (values.size() > 4) {
                    output = new File(values.get(4));
                }
               
                try {
                    results = launcher.runHTMLSuite( values.get(0),  values.get(1),  values.get(2), output, remoteControl.getConfiguration().getTimeoutInSeconds(), "true".equals(values.get(3)));
                } catch (IOException e) {
                    e.printStackTrace();
                    results = e.toString();
                }
            }
View Full Code Here

                RemoteControlLauncher.usage("Can't find HTML Suite file:" + suiteFile.getAbsolutePath());
                System.exit(1);
            }
            addNewStaticContent(suiteFile.getParentFile());
            String startURL = getRequiredSystemProperty("htmlSuite.startURL");
            HTMLLauncher launcher = new HTMLLauncher(this);
            String resultFilePath = getRequiredSystemProperty("htmlSuite.resultFilePath");
            File resultFile = new File(resultFilePath);
            resultFile.createNewFile();

            if (!resultFile.canWrite()) {
                RemoteControlLauncher.usage("can't write to result file " + resultFilePath);
                System.exit(1);
            }

            result = launcher.runHTMLSuite(getRequiredSystemProperty("htmlSuite.browserString"), startURL, suiteFile, resultFile,
                    configuration.getTimeoutInSeconds(), configuration.isMultiWindow());

            if (!"PASSED".equals(result)) {
                System.err.println("Tests failed, see result file for details: " + resultFile.getAbsolutePath());
                System.exit(1);
View Full Code Here

        }
    }


    protected boolean runSelfTests() throws IOException {
        return new HTMLLauncher(this).runSelfTests(configuration.getSelfTestDir());
    }
View Full Code Here

            } else {
                results = "ERROR: dir does not exist - " + dir.getAbsolutePath();
            }
            break;
        case runHTMLSuite:
          HTMLLauncher launcher = new HTMLLauncher(remoteControl);
            File output = null;
            if (values.size() < 4) {
                results = "ERROR: Not enough arguments (browser, browserURL, suiteURL, multiWindow, [outputFile])";
            } else {
                if (values.size() > 4) {
                    output = new File(values.get(4));
                }
               
                try {
                    results = launcher.runHTMLSuite( values.get(0),  values.get(1),  values.get(2), output, remoteControl.getConfiguration().getTimeoutInSeconds(), "true".equals(values.get(3)));
                } catch (IOException e) {
                    e.printStackTrace();
                    results = e.toString();
                }
            }
View Full Code Here

                RemoteControlLauncher.usage("Can't find HTML Suite file:" + suiteFile.getAbsolutePath());
                System.exit(1);
            }
            addNewStaticContent(suiteFile.getParentFile());
            String startURL = getRequiredSystemProperty("htmlSuite.startURL");
            HTMLLauncher launcher = new HTMLLauncher(this);
            String resultFilePath = getRequiredSystemProperty("htmlSuite.resultFilePath");
            File resultFile = new File(resultFilePath);
            resultFile.createNewFile();

            if (!resultFile.canWrite()) {
                RemoteControlLauncher.usage("can't write to result file " + resultFilePath);
                System.exit(1);
            }

            result = launcher.runHTMLSuite(getRequiredSystemProperty("htmlSuite.browserString"), startURL, suiteFile, resultFile,
                    configuration.getTimeoutInSeconds(), (!configuration.isSingleWindow()));

            if (!"PASSED".equals(result)) {
                System.err.println("Tests failed, see result file for details: " + resultFile.getAbsolutePath());
                System.exit(1);
View Full Code Here

    File suiteFile = asFile(scriptName);

    String result = null;
    try {
      LOG.info("Server started, launching test suite");
      HTMLLauncher launcher = new HTMLLauncher(remoteControl);
      result = launcher.runHTMLSuite(browser, browserURL, suiteFile, outputFile, timeoutInSeconds, multiWindow);
      LOG.info("Finished execution of test suite, result = " + result);
    } catch (Exception e) {
      LOG.error("Failed to run test suite", e);
      throw e;
    }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.server.htmlrunner.HTMLLauncher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.