Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.SeleniumException


     */
    public void load(String filename) {
        try {
            load(new FileInputStream(filename));
        } catch (FileNotFoundException e) {
            throw new SeleniumException(e);
        }
    }
View Full Code Here


      Writer out = new FileWriter(pacFile);
      pac.outputTo(out);
      out.close();
      return pacFile;
    } catch (IOException e) {
      throw new SeleniumException("Unable to configure proxy. Selenium will not work.");
    }
  }
View Full Code Here

          } else {
            try {
              Thread.sleep(Long.parseLong(command.getTarget()));
            } catch (NumberFormatException e) {
              log.warn("invalid argument for pause command: " + command.getTarget());
              throw new SeleniumException(e);
            } catch (InterruptedException e) {
              log.warn("pause command interrupted");
            }
          }
          ++processedCommands;
View Full Code Here

      try {
        toReturn =
            (WebElement) ((JavascriptExecutor) driver).executeScript(strategy, actualLocator);

        if (toReturn == null) {
          throw new SeleniumException("Element " + locator + " not found");
        }

        return toReturn;
      } catch (WebDriverException e) {
        throw new SeleniumException("Element " + locator + " not found");
      }
    }

    try {
      return findElementDirectly(driver, locator);
    } catch (WebDriverException e) {
      throw new SeleniumException("Element " + locator + " not found", e);
    }
  }
View Full Code Here

        }

        String alertMessage = selenium.getAlert();

        if (!message.equals(alertMessage)) {
            throw new SeleniumException(format(
                "Alert has been displayed, but the message '{0}' doesn't equal to the expected '{1}'", message,
                alertMessage));
        }

        return true;
View Full Code Here

        }

        String alertMessage = selenium.getAlert();

        if (!message.equals(alertMessage)) {
            throw new SeleniumException("Alert has been displayed, but the message '" + message
                + "' doesn't equal to the expected '" + alertMessage + "'");
        }

        return true;
    }
View Full Code Here

        }

        String alertMessage = selenium.getAlert();

        if (!message.equals(alertMessage)) {
            throw new SeleniumException("Alert has been displayed, but the message '" + message
                + "' doesn't equal to the expected '" + alertMessage + "'");
        }

        return true;
    }
View Full Code Here

TOP

Related Classes of com.thoughtworks.selenium.SeleniumException

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.