Exemplo n.º 1
0
  public boolean isMessageWithEmoticons(String subject) {

    while (DriverUtils.isElementNotPresent(driver, String.format(TOPIC_OF_THE_LETTER, subject))) {
      driver.navigate().refresh();
    }
    WebElement message = driver.findElement(By.xpath(String.format(TOPIC_OF_THE_LETTER, subject)));
    System.out.println("не нашел");
    message.click();
    System.out.println("click");
    if (DriverUtils.isElementPresent(driver, emoticons)) {
      if (driver.findElements(By.xpath(emoticons)).size() == MessagePage.getCountEmoticons()) {
        System.out.println("ok");
        return true;
      }
    }
    return false;
  }
Exemplo n.º 2
0
  public void isMessage(String subject) {

    while (DriverUtils.isElementNotPresent(driver, String.format(TOPIC_OF_THE_LETTER, subject))) {
      driver.navigate().refresh();
    }
    WebElement message = driver.findElement(By.xpath(String.format(TOPIC_OF_THE_LETTER, subject)));
    System.out.println("нашел");
    message.click();
    System.out.println("click");
  }
Exemplo n.º 3
0
 public void markLetterAsSpam(WebDriver driver) {
   DriverUtils.waitElementVisible(driver, buttonElse, 100);
   buttonElse.click();
   spam.click();
   DriverUtils.waitElementVisible(driver, spamMessage, 150);
 }