gpt4 book ai didi

org.jboss.arquillian.graphene.wait.WebDriverWait.until()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 07:59:05 29 4
gpt4 key购买 nike

本文整理了Java中org.jboss.arquillian.graphene.wait.WebDriverWait.until()方法的一些代码示例,展示了WebDriverWait.until()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebDriverWait.until()方法的具体详情如下:
包路径:org.jboss.arquillian.graphene.wait.WebDriverWait
类名称:WebDriverWait
方法名:until

WebDriverWait.until介绍

暂无

代码示例

代码示例来源:origin: org.richfaces/richfaces-page-fragments

@Override
  public void perform() {
    Graphene.waitGui().until().element(item).attribute("class").contains(OrderingListInPickList.SELECTED_ITEM_CLASS);
  }
})

代码示例来源:origin: cukespace/cukespace

@When("^I eat (\\d+) cukes$")
public void eatCukes(int cukes) throws IOException {
  waitAjax()/*we just loaded the page*/.until().element(bellyMouth).is().present();
  bellyMouth.sendKeys(Integer.toString(cukes));
  final File screenshot = new File("target/screenshots/eatCukes.png");
  screenshot.getParentFile().mkdirs();
  try (final OutputStream os = new FileOutputStream(screenshot)) {
    os.write(TakesScreenshot.class.cast(browser).getScreenshotAs(OutputType.BYTES));
  }
  waitGui()/*we are already on the page so faster wait cycle*/.until().element(bellyEat).is().present();
  bellyEat.click();
}

代码示例来源:origin: org.richfaces/richfaces-page-fragments

@Override
public void selectAllRowsWithKeyShortcut() {
  advanced().getTableBodyElement().sendKeys(Keys.chord(Keys.CONTROL, "a"));
  if (advanced().getTableRowsElements().size() >= 1) {
    Graphene.waitAjax().until().element(advanced().getTableRowsElements().get(0)).attribute("class")
      .contains(advanced().getStyleClassForSelectedRow());
    Graphene.waitAjax().until()
      .element(advanced().getTableRowsElements().get(advanced().getTableRowsElements().size() - 1))
      .attribute("class").contains(advanced().getStyleClassForSelectedRow());
  }
}

代码示例来源:origin: org.richfaces/richfaces-page-fragments

@Override
  public void perform() {
    Graphene.waitGui().until().element(getRootElement()).attribute("class").contains(getStyleClassForSelectedItem());
  }
})

代码示例来源:origin: org.richfaces/richfaces-page-fragments

@Override
public void switchTo(DataScrollerSwitchButton btn) {
  String prevPageText = advanced().getActivePageElement().getText();
  advanced().getButtonElement(btn).click();
  Graphene.waitModel().until().element(advanced().getActivePageElement()).text().not().equalTo(prevPageText);
}

代码示例来源:origin: org.richfaces/richfaces-page-fragments

private void switchTo(By by) {
  WebElement element = advanced().getRootElement().findElement(by);
  element.click();
  Graphene.waitModel().until().element(element).attribute("class").contains(advanced().getActiveClass());
}

代码示例来源:origin: org.richfaces/richfaces-page-fragments

@Override
public void deselectRow(int rowIndex, Keys... keys) {
  clickOnRow(rowIndex, keys);
  Graphene.waitAjax().until().element(advanced().getTableRowsElements().get(rowIndex)).attribute("class").not()
    .contains(advanced().getStyleClassForSelectedRow());
}

代码示例来源:origin: org.richfaces/richfaces-page-fragments

@Override
  public void perform() {
    Graphene.waitGui().until().element(getRootElement()).attribute("class").not().contains(getStyleClassForSelectedItem());
  }
})

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testElementTextEqualsIgnoreCase() {
 textInput.clear();
 textInput.sendKeys("florence and the machine");
 updateButton.click();
 Graphene.waitModel().until().element(header).text().equalToIgnoreCase("FLORENCE aNd THE machIne");
 textInput.sendKeys("Tested Header");
 updateButton.click();
 Graphene.waitModel().until().element(header).text().not().equalToIgnoreCase("FLORENCE aNd THE machIne");
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testElementTextContainsWithBy() {
  textInput.clear();
  textInput.sendKeys("florence and the machine");
  updateButton.click();
  Graphene.waitModel().until().element(BY_HEADER).text().contains("machine");
  textInput.clear();
  textInput.sendKeys("Tested Header");
  updateButton.click();
  Graphene.waitModel().until().element(BY_HEADER).text().not().contains("machine");
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testElementIsClickable() {
 Graphene.waitModel().until().element(hideButton).is().clickable();
 hideButton.click();
 Graphene.waitModel().until().element(hideButton).is().not().clickable();
 Graphene.waitModel().until().element(appearButton).is().clickable();
 appearButton.click();
 Graphene.waitModel().until().element(appearButton).is().not().clickable();
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testAttributeIsPresentDirectly() {
 hideButton.click();
 Graphene.waitModel().until().element(BY_HEADER).attribute("style").is().present();
 appearButton.click();
 Graphene.waitModel().until().element(BY_HEADER).attribute("style").is().not().present();
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void textElementIsPresent() {
 loadPage();
 checkElementIsPresent(Graphene.waitModel().until().element(BY_JQUERY_HEADER));
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testElementIsSelected() {
 loadPage();
 checkElementIsSelected(Graphene.waitModel().until().element(BY_JQUERY_OPTION1));
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testElementIsVisible() {
  loadPage();
  checkElementIsVisible(Graphene.waitModel().until().element(BY_JQUERY_HEADER));
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
  public void testValueEquals() {
   checkAttributeValueEquals(Graphene.waitModel().until().element(BY_TEXT_INPUT).value());
  }
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testElementIsSelected() {
  loadPage();
  checkElementIsSelected(Graphene.waitModel().until().element(BY_JQUERY_OPTION1));
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testEmptyAttribute() {
  Graphene.waitModel().until().element(BY_INPUT_WITH_EMPTY_STYLE).attribute("style").is().not().present();
  Graphene.waitModel().until().element(BY_INPUT_WITH_NO_STYLE_DEFINED).attribute("style").is().not().present();
  Graphene.waitModel().until().element(BY_INPUT_WITH_EMPTY_STYLE_WHITE_SPACES).attribute("style").is().not().present();
  Graphene.waitModel().until().element(BY_INPUT_WITH_EMPTY_READONLY).attribute("readonly").is().present();
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testElementIsSelected() {
  new Select(select).selectByIndex(0);
  Graphene.waitModel().until().element(option1).is().selected();
  new Select(select).selectByIndex(1);
  Graphene.waitModel().until().element(option1).is().not().selected();
}

代码示例来源:origin: arquillian/arquillian-graphene

@Test
public void testElementIsSelectedWithBy() {
 new Select(select).selectByIndex(0);
 Graphene.waitModel().until().element(BY_OPTION1).is().selected();
 new Select(select).selectByIndex(1);
 Graphene.waitModel().until().element(BY_OPTION1).is().not().selected();
}

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com