private static String[] addCLIParamters(SeleneseMethodInfo seleneseMethodInfo) {
   if (seleneseMethodInfo == null) {
     return new String[0];
   }
   List<String> cliArgs = new ArrayList<String>();
   if (StringUtils.isNoneEmpty(seleneseMethodInfo.driver())) {
     cliArgs.add("-d");
     cliArgs.add(seleneseMethodInfo.driver());
   }
   cliArgs.addAll(Arrays.asList(seleneseMethodInfo.configArgs()));
   return cliArgs.toArray(new String[cliArgs.size()]);
 }
 private static Runner createRunnerIfNotExists(
     SeleneseMethodInfo seleneseMethodInfo, String globalConfParameter) {
   if (threadLocalRunner.get() != null) {
     return threadLocalRunner.get().getRunner();
   }
   String configPath =
       seleneseMethodInfo == null ? StringUtils.EMPTY : seleneseMethodInfo.configPath();
   ConfigFileHandler configFileHandler = new ConfigFileHandler(globalConfParameter, configPath);
   String[] cliParamters = addCLIParamters(seleneseMethodInfo);
   IConfig config = configFileHandler.getComposedConfig(cliParamters);
   Runner runner = new Runner();
   threadLocalRunner.set(new RunnerContext(runner, config));
   new SeleneseRunnerSetup(runner, config).setupRunner();
   return runner;
 }