コード例 #1
0
 public void start() {
   try {
     commandProcessor.start();
   } catch (Exception e) {
     final String message = e.getMessage();
     if (message != null && message.startsWith("Connection refused")) {
       throw new RuntimeException(
           "Could not contact Selenium Server; have you started it on '"
               + commandProcessor.getRemoteControlServerLocation()
               + "' ?\nRead more at http://seleniumhq.org/projects/remote-control/not-started.html\n"
               + e.getMessage());
     }
     throw new RuntimeException("Could not start Selenium session: " + e.getMessage(), e);
   }
 }
コード例 #2
0
 public void start(String optionsString) {
   try {
     commandProcessor.start(optionsString);
   }
   // TODO: EB Add exception catching for bad BrowserConfigurationOptions (i.e. Extension Not
   // Found)
   catch (Exception e) {
     final String message = e.getMessage();
     if (message != null && message.indexOf("Connection refused: connect") != -1) {
       throw new RuntimeException(
           "Could not contact Selenium Server; have you started it?\n" + e.getMessage());
     }
     throw new RuntimeException("Could not start Selenium session: " + e.getMessage(), e);
   }
 }