public boolean exibiuColunaDiaAnteriorNaTerceiraTabelaBolsasMundiais() {
   return exibiuTerceiraTabelaDentroDeBolsasMundiais()
       .findElement(By.className("tab"))
       .findElement(By.className("dia_anterior"))
       .getText()
       .equals("DIA ANTERIOR");
 }
 public boolean exibiuData() {
   return !getDriver()
       .findElement(By.className("info"))
       .findElement(By.className("dateTime"))
       .getText()
       .isEmpty();
 }
 public void verifyCommentRowContent(
     String commentRowIdSuffix, String commentText, String giverName) {
   WebDriverWait wait = new WebDriverWait(browser.driver, 30);
   WebElement commentRow;
   try {
     commentRow =
         wait.until(
             ExpectedConditions.presenceOfElementLocated(
                 By.id("responseCommentRow" + commentRowIdSuffix)));
   } catch (TimeoutException e) {
     fail("Timeout!");
     commentRow = null;
   }
   try {
     wait.until(
         ExpectedConditions.textToBePresentInElement(
             commentRow.findElement(By.id("plainCommentText" + commentRowIdSuffix)), commentText));
   } catch (TimeoutException e) {
     fail("Not expected message");
   }
   try {
     assertTrue(commentRow.findElement(By.className("text-muted")).getText().contains(giverName));
   } catch (AssertionError e) {
     assertTrue(commentRow.findElement(By.className("text-muted")).getText().contains("you"));
   }
 }
 public String exibiuPrimeiroParagrafoDeObservacao() {
   return exibiuTabelaDoINSS()
       .findElement(By.className("tab"))
       .findElement(By.className("observacao"))
       .findElement(By.tagName("p"))
       .getText();
 }
示例#5
0
 private List<WebElement> getCompareTabEntries() {
   return getTranslationHistoryBox()
       .findElements(By.className("gwt-TabLayoutPanelContent"))
       // Second tab
       .get(1)
       .findElements(By.className("textFlowEntry"));
 }
 public boolean exibiuColunaDescricaoIndicadoresFinanceiros() {
   return exibiuTabelaDeIndicadoresFinanceiros()
       .findElement(By.className("tab"))
       .findElement(By.className("descricao"))
       .getText()
       .equals("DESCRIÇÃO");
 }
 public boolean exibiuColunaSalarioDeContribuicaoDoINSS() {
   return exibiuTabelaDoINSS()
       .findElement(By.className("tab"))
       .findElement(By.className("descricao"))
       .getText()
       .equals("SALÁRIO DE CONTRIBUIÇÃO");
 }
 public boolean exibiuColunaCompraCambiosEMoedas() {
   return exibiuTabelaDeCambioEMoedas()
       .findElement(By.className("tab"))
       .findElement(By.className("compra"))
       .getText()
       .equals("COMPRA");
 }
 public boolean exibiuColunaVendaCambiosEMoedas() {
   return exibiuTabelaDeCambioEMoedas()
       .findElement(By.className("tab"))
       .findElement(By.className("venda"))
       .getText()
       .equals("VENDA");
 }
 public boolean exibiuColunaDescricaoCambiosEMoedas() {
   return exibiuTabelaDeCambioEMoedas()
       .findElement(By.className("tab"))
       .findElement(By.className("descricao"))
       .getText()
       .equals("DESCRIÇÃO");
 }
 public boolean exibiuColunaUltimoCambiosEMoedas() {
   return exibiuTabelaDeCambioEMoedas()
       .findElement(By.className("tab"))
       .findElement(By.className("ultimo"))
       .getText()
       .equals("ÚLTIMO");
 }
 public boolean exibiuColunaPapelCambiosEMoedas() {
   return exibiuTabelaDeCambioEMoedas()
       .findElement(By.className("tab"))
       .findElement(By.className("papel"))
       .getText()
       .equals("PAPEL");
 }
 public boolean exibiuColunaDataNaTerceiraTabelaBolsasMundiais() {
   return exibiuTerceiraTabelaDentroDeBolsasMundiais()
       .findElement(By.className("tab"))
       .findElement(By.className("data"))
       .getText()
       .equals("DATA");
 }
 public boolean exibiuColunaVariacaoNaTerceiraTabelaBolsasMundiais() {
   return exibiuTerceiraTabelaDentroDeBolsasMundiais()
       .findElement(By.className("tab"))
       .findElement(By.className("variacao"))
       .getText()
       .equals("VARIAÇÃO");
 }
 public boolean exibiuColunaDataPetroleoEOuro() {
   return exibiuTabelaDePetroleoEOuro()
       .findElement(By.className("tab"))
       .findElement(By.className("data"))
       .getText()
       .equals("DATA");
 }
 public boolean exibiuColunaVariacaoCambiosEMoedas() {
   return exibiuTabelaDeCambioEMoedas()
       .findElement(By.className("tab"))
       .findElement(By.className("variacao"))
       .getText()
       .equals("VARIAÇÃO");
 }
 public boolean exibiuColunaPapelIndicadoresFinanceiros() {
   return exibiuTabelaDeIndicadoresFinanceiros()
       .findElement(By.className("tab"))
       .findElement(By.className("papel"))
       .getText()
       .equals("PAPEL");
 }
 public boolean exibiuColunaIndicePetroleoEOuro() {
   return exibiuTabelaDePetroleoEOuro()
       .findElement(By.className("tab"))
       .findElement(By.className("descricao"))
       .getText()
       .equals("ÍNDICE");
 }
 public boolean exibiuColunaVariacaoIndicadoresFinanceiros() {
   return exibiuTabelaDeIndicadoresFinanceiros()
       .findElement(By.className("tab"))
       .findElement(By.className("variacao"))
       .getText()
       .equals("VARIAÇÃO (%)");
 }
 public boolean exibiuColunaUltimoPetroleoEOuro() {
   return exibiuTabelaDePetroleoEOuro()
       .findElement(By.className("tab"))
       .findElement(By.className("ultimo"))
       .getText()
       .equals("ÚLTIMO");
 }
 public boolean exibiuColunaAliquotaDoINSS() {
   return exibiuTabelaDoINSS()
       .findElement(By.className("tab"))
       .findElement(By.className("valor"))
       .getText()
       .equals("ALÍQUOTA");
 }
 public boolean exibiuColunaVariacaoPetroleoEOuro() {
   return exibiuTabelaDePetroleoEOuro()
       .findElement(By.className("tab"))
       .findElement(By.className("variacao"))
       .getText()
       .equals("VARIAÇÃO");
 }
  public Page login(String userName, String password, LoginTo loginTo)
      throws IOException, InterruptedException {
    log.info("login as " + userName);

    // Wait until login page loading is completed.
    WebDriverWait wait = new WebDriverWait(driver, 30);

    wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("username")));
    wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("password")));

    wait.until(
        ExpectedConditions.visibilityOfElementLocated(
            new ByAll(By.className("btn-primary"), By.tagName("input"))));

    driver.findElement(By.id("username")).sendKeys(userName);
    driver.findElement(By.id("password")).sendKeys(password);

    driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);

    driver.findElement(By.className("btn-primary")).click();

    if (loginTo == LoginTo.PUBLISHER) {
      return PublisherWebAppsListPage.getPage(driver, appMServer);
    } else {
      return StoreHomePage.getPage(driver, appMServer);
    }
  }
 public boolean exibiuColunaFechamentoPetroleoEOuro() {
   return exibiuTabelaDePetroleoEOuro()
       .findElement(By.className("tab"))
       .findElement(By.className("fechamento"))
       .getText()
       .equals("FECHAMENTO");
 }
 public boolean exibiuTituloDePrevisoes() {
   return !getDriver()
       .findElement(By.className("info"))
       .findElement(By.className("resume"))
       .getText()
       .isEmpty();
 }
 public boolean exibiuColunaMoedaPetroleoEOuro() {
   return exibiuTabelaDePetroleoEOuro()
       .findElement(By.className("tab"))
       .findElement(By.className("moeda"))
       .getText()
       .equals("MOEDA");
 }
  private void initParams() {
    WebElement dateSlot = getDriver().findElement(By.className("v-datecellslot"));
    int dateSlotWidth = dateSlot.getSize().getWidth();
    noOverlapWidth = dateSlotWidth;
    oneOverlapWidth = dateSlotWidth / 2;
    twoOverlapsWidth = dateSlotWidth / 3;

    Comparator<WebElement> startTimeComparator =
        new Comparator<WebElement>() {
          @Override
          public int compare(WebElement e1, WebElement e2) {
            int e1Top = e1.getLocation().getY();
            int e2Top = e2.getLocation().getY();
            return e1Top - e2Top;
          }
        };

    List<WebElement> eventElements =
        getDriver().findElements(By.className("v-calendar-event-content"));
    Collections.sort(eventElements, startTimeComparator);
    firstEvent = eventElements.get(0);
    secondEvent = eventElements.get(1);
    thirdEvent = eventElements.get(2);

    List<WebElement> resizeBottomElements =
        getDriver().findElements(By.className("v-calendar-event-resizebottom"));
    Collections.sort(resizeBottomElements, startTimeComparator);
    firstEventBottomResize = resizeBottomElements.get(0);
    secondEventBottomResize = resizeBottomElements.get(1);
    thirdEventBottomResize = resizeBottomElements.get(2);
  }
 public boolean exibiuColunaHoraPetroleoEOuro() {
   return exibiuTabelaDePetroleoEOuro()
       .findElement(By.className("tab"))
       .findElement(By.className("hora"))
       .getText()
       .equals("HORA");
 }
示例#29
0
  public MetricsAreaFragment getMetricsArea(String title) {
    ////// add property
    By selector =
        By.xpath(
            ".//table[contains(@class, '"
                + PropUtils.get("metrics.container.class")
                + "')][.//h3[text()='"
                + title
                + "']]");
    WebElement element = null;
    try {
      element = getContentRoot().findElement(selector);
    } catch (NoSuchElementException exc) {
      return null;
    }
    MetricsAreaFragment area = Graphene.createPageFragment(MetricsAreaFragment.class, element);

    Map<String, String> metricGrid =
        element
            .findElement(By.className(PropUtils.get("metrics.grid.class")))
            .findElements(By.tagName("tr"))
            .stream()
            .collect(
                Collectors.toMap(
                    e ->
                        e.findElement(By.className(PropUtils.get("metrics.grid.nominal.class")))
                            .getText(),
                    e ->
                        e.findElement(By.className(PropUtils.get("metrics.grid.numerical.class")))
                            .getText()));

    area.setMetricGrid(metricGrid);

    return area;
  }
 public boolean exibiuColunaIndiceNaTerceiraTabelaBolsasMundiais() {
   return exibiuTerceiraTabelaDentroDeBolsasMundiais()
       .findElement(By.className("tab"))
       .findElement(By.className("descricao"))
       .getText()
       .equals("ÍNDICE");
 }