コード例 #1
0
  private WebElement getContextPickerRootByLabel(String label) {
    By selector = By.className(PropUtils.get("navigation.selector.class"));
    By pickerSelector = By.className(PropUtils.get("components.selectbox.class"));
    List<WebElement> elements = browser.findElements(selector);
    for (WebElement elem : elements) {
      if (elem.getText().toLowerCase().contains(label.toLowerCase())) {
        WebElement pickerRoot = elem.findElement(pickerSelector);
        return pickerRoot;
      }
    }

    throw new NoSuchElementException("Unable to find context picker root");
  }
コード例 #2
0
 public <T extends WizardWindow> T addResource(Class<T> clazz) {
   String label = PropUtils.get("config.shared.add.label");
   return addResource(clazz, label);
 }