This method starts the selenium remote control using the parameters
informed by testng.xml file
@param parameters
@throws Exception
347371
@BeforeSuite(alwaysRun=true)
	@Parameters(value={"parameters"})
	public static void startSelenium(String parameters)
	{
		parametersMap = parameterScanner(parameters);
		
		parametersInfo();
		
		String 	browserName = parametersMap.get("browser"),
				profile = parametersMap.get("profile"),
				chromeDriverBin = parametersMap.get("chromeDriverBin"),
				ieDriverBin = parametersMap.get("ieDriverBin"),
				chromeBin = parametersMap.get("chromeBin"),
				languages = parametersMap.get("languages");
				
		if(browserName == null){
			throw new IllegalArgumentException(String.format(ErrorMessages.ERROR_TEMPLATE_VARIABLE_NULL,"browser"));
		}
		
		if(driver == null) {
			if(BrowsersList.FIREFOX.equalsString(browserName)){
				FirefoxProfile fp = new FirefoxProfile();
				fp.setPreference("dom.max_script_run_time", 0);
				fp.setPreference("dom.max_chrome_script_run_time", 0);
				if(profile != null && !profile.isEmpty()){
					fp.setPreference("webdriver.firefox.profile", profile);
				}
				if(languages != null && !languages.isEmpty()){
					fp.setPreference("intl.accept_languages", languages);
				}
				driver = new WebDriverAdapter(new FirefoxDriver(fp));
			}
			else if(BrowsersList.CHROME.equalsString(browserName)) {
				
				if(chromeBin == null){
					throw new IllegalArgumentException(String.format(ErrorMessages.ERROR_TEMPLATE_VARIABLE_NULL,"chromeBin"));
				}
				
				
				// Optional, if not specified, WebDriver will search your path for chromedriver 
				// in the system environment. (OBS: To evade problems, webdriver.chrome.driver MUST have a value.
				if(System.getProperty("webdriver.chrome.driver") == null || System.getProperty("webdriver.chrome.driver").isEmpty()){
					if(chromeDriverBin == null){
						throw new IllegalArgumentException(String.format(ErrorMessages.ERROR_TEMPLATE_VARIABLE_NULL,"chromeDriverBin"));
					}
					System.setProperty("webdriver.chrome.driver", chromeDriverBin);	
				}
				
				ChromeOptions co = new ChromeOptions();
				// Get the chrome binary directory path from System Envionment.
				co.setBinary(new File(chromeBin));
				driver = new WebDriverAdapter(new ChromeDriver(co));
			}
			else if(BrowsersList.IE.equalsString(browserName))
			{
				if(ieDriverBin == null){
						throw new IllegalArgumentException(String.format(ErrorMessages.ERROR_TEMPLATE_VARIABLE_NULL,"ieDriverBin"));
				}
				System.setProperty("webdriver.ie.driver", ieDriverBin);	
				driver = new WebDriverAdapter(new InternetExplorerDriver());
			}
			else if(BrowsersList.HTML_UNIT.equalsString(browserName)){
				driver = new HtmlUnitDriver(true);
			}
			else {
				throw new IllegalArgumentException(ErrorMessages.ERROR_BROWSER_INVALID);
			}
		}
		/* Sets to all driver methods the global timeout of 1 second. 
		 * To tests, Timeouts must be specified on the components.
		 */
		SeleniumController.driver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);
		SeleniumController.builder = new SeleniumBuilder(driver);
		SeleniumController.browser = new SeleniumBrowser();
		ListenerGateway.setWebDriver(driver);
		ListenerGateway.setParameters(parametersMap);
	}
400068
public static void main(String[] args) throws Exception {

        CmsRemoteShellClient client = new CmsRemoteShellClient(args);
        client.run();
    }
314455
public void startDriverOnUrl(final WebDriver webDriver, final String browserUrl) {
        setCommandProcessor(startWebDriverCommandProcessor(browserUrl, webDriver));
        setTimeoutOnSelenium();
        LOG.debug("Started command processor");
    }
102150
public static void w(String tag, String pattern, Object... parameters) {
        w(SUBSYSTEM.MAIN, tag, pattern, parameters);
    }
938981
public static void i(String tag, String pattern, Object... parameters) {
        i(SUBSYSTEM.MAIN, tag, pattern, parameters);
    }
181827
public void launch() throws Exception {
    final Injector injector = Tang.Factory.getTang().newInjector(readConfigurationFromDisk(this.configurationFilePath));
    final EvaluatorShim evaluatorShim = injector.getInstance(EvaluatorShim.class);
    evaluatorShim.run();
  }
623597
public static void main(final String[] args) throws BindException, InjectionException {

    final Tang tang = Tang.Factory.getTang();

    final JavaConfigurationBuilder cb = tang.newConfigurationBuilder();

    try{
      new CommandLine(cb)
          .registerShortNameOfClass(NodeListFilePath.class)
          .registerShortNameOfClass(SshPortNum.class)
          .processCommandLine(args);
    } catch(final IOException ex) {
      LOG.log(Level.SEVERE, "Missing parameter 'nodelist' or wrong parameter input.");
      throw new RuntimeException("Missing parameter 'nodelist' or wrong parameter input: ", ex);
    }

    final Injector injector = tang.newInjector(cb.build());

    final String nodeListFilePath = injector.getNamedInstance(NodeListFilePath.class);
    final int sshPortNum = injector.getNamedInstance(SshPortNum.class);

    final Configuration runtimeConf = getRuntimeConfiguration(nodeListFilePath, sshPortNum);
    final Configuration driverConf = getDriverConfiguration();

    final LauncherStatus status = DriverLauncher
        .getLauncher(runtimeConf)
        .run(driverConf, JOB_TIMEOUT);
    LOG.log(Level.INFO, "REEF job completed: {0}", status);
  }
139546
public boolean run(String... arguments) throws Exception {
        try {
            if (isFlag(HELP, arguments)) {
                parser.printHelp(stdOut);
            } else if (isFlag(VERSION, arguments)) {
                parser.printVersion(stdOut);
            } else {
                final Namespace namespace = parser.parseArgs(arguments);
                final Command command = requireNonNull(commands.get(namespace.getString(COMMAND_NAME_ATTR)),
                    "Command is not found");
                try {
                    command.run(bootstrap, namespace);
                } catch (Throwable e) {
                    // The command failed to run, and the command knows
                    // best how to cleanup / debug exception
                    command.onError(this, namespace, e);
                    return false;
                }
            }
            return true;
        } catch (HelpScreenException ignored) {
            // This exception is triggered when the user passes in a help flag.
            // Return true to signal that the process executed normally.
            return true;
        } catch (ArgumentParserException e) {
            stdErr.println(e.getMessage());
            e.getParser().printHelp(stdErr);
            return false;
        }
    }
1037519
void addParameter(String parameter) {

        TextField textField = new TextField();
        if (parameter != null) {
            textField.setValue(parameter);
        }
        CmsRemovableFormRow<TextField> row = new CmsRemovableFormRow<TextField>(
            textField,
            CmsVaadinUtils.getMessageText(Messages.GUI_SITE_REMOVE_PARAMETER_0));
        row.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_SITE_PARAMETER_0));
        row.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_SITE_PARAMETER_HELP_0));
        m_parameter.addComponent(row);
    }
413482
void addParameter(String parameter) {

        TextField textField = new TextField();
        if (parameter != null) {
            textField.setValue(parameter);
        }
        m_parameterGroup.addRow(textField);
    }
792264
public static void main(String[] arg)
    {
        try
        {
            for (int i = 0; i < arg.length; i++)
                new XmlConfiguration(Resource.newResource(arg[i]).getURL()).newInstance();
        }
        catch (Exception e)
        {
            log.warn(LogSupport.EXCEPTION, e);
        }
    }
872620
@Override
    public void startElement(final String uri, final String localName, final String qName,
                             final Attributes atts) throws SAXException {
        ignoreStack.push(MAP_RELTABLE.matches(atts) ? false : ignoreStack.isEmpty() || ignoreStack.peek());

        Attributes res = atts;
        if (ignoreStack.peek() && MAP_TOPICREF.matches(res)) {
            final URI href = toURI(res.getValue(ATTRIBUTE_NAME_HREF));
            final URI copyTo = toURI(res.getValue(ATTRIBUTE_NAME_COPY_TO));
            final URI source = copyTo != null ? copyTo : href;
            final String scope = res.getValue(ATTRIBUTE_NAME_SCOPE);
            final String format = res.getValue(ATTRIBUTE_NAME_FORMAT);
            // FIXME: handle cascading
            final String processingRole = res.getValue(ATTRIBUTE_NAME_PROCESSING_ROLE);
            if (source != null &&
                    (scope == null || scope.equals(ATTR_SCOPE_VALUE_LOCAL)) &&
                    (format == null || format.equals(ATTR_FORMAT_VALUE_DITA)) &&
                    (processingRole == null || processingRole.equals(ATTR_PROCESSING_ROLE_VALUE_NORMAL))) {
                final URI file = stripFragment(source);
                Integer count = topicrefCount.getOrDefault(file, 0);
                count++;
                topicrefCount.put(file, count);
                if (count > 1) { // not only reference to this topic
                    final FileInfo srcFi = job.getFileInfo(currentFile.resolve(stripFragment(source)));
                    if (srcFi != null) {
                        final FileInfo dstFi = generateCopyToTarget(srcFi, count);
                        copyToMap.put(dstFi, srcFi);

                        final URI dstTempAbs = job.tempDirURI.resolve(dstFi.uri);
                        final URI targetRel = getRelativePath(currentFile, dstTempAbs);
                        final URI target = setFragment(targetRel, href.getFragment());

                        final AttributesImpl buf = new AttributesImpl(atts);
                        XMLUtils.addOrSetAttribute(buf, ATTRIBUTE_NAME_COPY_TO, target.toString());
                        res = buf;
                    }
                }
            }
        }

        getContentHandler().startElement(uri, localName, qName, res);
    }
976254
@Override
    public void configure(String parameters) {
        if (parameters.isEmpty()) {
            return;
        }
        List<String> values = Op.split(parameters, " ", true);
        final int required = 2;
        if (values.size() < required) {
            throw new RuntimeException(MessageFormat.format(
                    "[configuration error] activation {0} requires {1} parameters",
                    this.getClass().getSimpleName(), required));
        }

        setNumberOfRules(Integer.parseInt(values.get(0)));
        setThreshold(Op.toDouble(values.get(1)));
    }
1371677
protected void remoteInit() throws JMSException
    {
        QueueBrowserGetEnumerationQuery query = new QueueBrowserGetEnumerationQuery();
        query.setSessionId(session.getId());
        query.setBrowserId(browser.getId());
        QueueBrowserGetEnumerationResponse response = (QueueBrowserGetEnumerationResponse)transportEndpoint.blockingRequest(query);
        this.id = response.getEnumId();
        log.debug("Remote queue browser enumeration ID is "+id);
    }
1054541
public void start() throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "start", this);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(tc, "Start ME, mode defaulting to ME_START_DEFAULT");
        start(JsConstants.ME_START_DEFAULT);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "start");
    }
435637
protected void assertNoNameParameter(Method executeMethod, String urlPattern, String elementName) {
        if (!elementName.isEmpty()) {
            throwUrlPatternNamedParameterUnsupportedException(executeMethod, urlPattern, elementName);
        }
    }
1099703
public void run() throws Exception {

        Registry registry = LocateRegistry.getRegistry(m_registryPort);
        I_CmsRemoteShellProvider provider = (I_CmsRemoteShellProvider)(registry.lookup(
            CmsRemoteShellConstants.PROVIDER));
        m_remoteShell = provider.createShell(m_additionalCommands);
        m_prompt = m_remoteShell.getPrompt();
        m_out = new PrintStream(System.out);
        try {
            LineNumberReader lnr = new LineNumberReader(new InputStreamReader(m_input, "UTF-8"));
            while (!exitCalled()) {
                if (m_interactive || isEcho()) {
                    // print the prompt in front of the commands to process only when 'interactive'
                    printPrompt();
                }
                String line = lnr.readLine();
                if (line == null) {
                    break;
                }
                if (line.trim().startsWith("#")) {
                    m_out.println(line);
                    continue;
                }
                StringReader lineReader = new StringReader(line);
                StreamTokenizer st = new StreamTokenizer(lineReader);
                st.eolIsSignificant(true);
                st.wordChars('*', '*');
                // put all tokens into a List
                List<String> parameters = new ArrayList<String>();
                while (st.nextToken() != StreamTokenizer.TT_EOF) {
                    if (st.ttype == StreamTokenizer.TT_NUMBER) {
                        parameters.add(Integer.toString(new Double(st.nval).intValue()));
                    } else {
                        parameters.add(st.sval);
                    }
                }
                lineReader.close();

                if (parameters.size() == 0) {
                    // empty line, just need to check if echo is on
                    if (isEcho()) {
                        m_out.println();
                    }
                    continue;
                }

                // extract command and arguments
                String command = parameters.get(0);
                List<String> arguments = new ArrayList<String>(parameters.subList(1, parameters.size()));

                // execute the command with the given arguments
                executeCommand(command, arguments);

            }
            exit(0);
        } catch (Throwable t) {
            t.printStackTrace();
            if (m_errorCode != -1) {
                exit(m_errorCode);
            }
        }
    }