Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.SeleniumException


      }
      StringBuilder sb = new StringBuilder()
                         .append(i)
                         .append(" PPR action(s) executed with no valid result.\n")
                         .append(sSelenium.getBodyText());
      throw new SeleniumException(sb.toString());
    }
  }
View Full Code Here


    }
    StringBuilder sb = new StringBuilder()
                       .append("No valid response to PPR action.\n")
                       .append(sSelenium.getBodyText());
    throw new SeleniumException(sb.toString());
  }
View Full Code Here

      }
      StringBuilder sb = new StringBuilder()
                         .append(i)
                         .append(" full page request action(s) have been performed on this portlet without any final result or test components to exercise.\n")
                         .append(sSelenium.getBodyText());
      throw new SeleniumException(sb.toString());
    }
    StringBuilder sb = new StringBuilder()
                       .append(MAX_NUMBER_ACTIONS)
                       .append(" actions have been performed on this portlet without any final result.\n")
                       .append(sSelenium.getBodyText());
    throw new SeleniumException(sb.toString());
  }
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

  }

  public void start(Object o) {
    if (driver != null) {
      if (maker != null) {
        throw new SeleniumException("You may not start more than one session at a time");
      } else {
        // The command processor was instantiated with an already started driver
        return;
      }
    }
View Full Code Here

      Set<String> windowHandles = driver.getWindowHandles();
      windowHandles.remove(originalWindowHandle);
      if (!windowHandles.isEmpty()) {
        driver.switchTo().window(windowHandles.iterator().next());
      } else {
        throw new SeleniumException("Unable to find a popup window");
      }
    } else {
      selectWindow(driver, windowID);
    }
  }
View Full Code Here

        int index = Integer.parseInt(locator.substring("index=".length()));
        lastFrame.put(driver.getWindowHandle(), locator);
        driver.switchTo().frame(index);
        return;
      } catch (NumberFormatException e) {
        throw new SeleniumException(e.getMessage(), e);
      } catch (NoSuchFrameException e) {
        throw new SeleniumException(e.getMessage(), e);
      }
    }

    if (locator.startsWith("id=")) {
      locator = locator.substring("id=".length());
    } else if (locator.startsWith("name=")) {
      locator = locator.substring("name=".length());
    }

    try {
      lastFrame.put(driver.getWindowHandle(), locator);
      driver.switchTo().frame(locator);
    } catch (NoSuchFrameException e) {
      throw new SeleniumException(e.getMessage(), e);
    }
  }
View Full Code Here

      }
    }

    driver.switchTo()
        .window(current);
    throw new SeleniumException("Unable to select window with title: " + title);
  }
View Full Code Here

        return;
      }
    }
    // We couldn't find it
    driver.switchTo().window(current);
    throw new SeleniumException("Unable to select window _blank");
  }
View Full Code Here

    public int getIndex() {
        try {
            return Integer.parseInt(arg);
        } catch (NumberFormatException e) {
            throw new SeleniumException("Invalid \"" + type + "\" locator argument: " + arg, e);
        }
    }
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.