Exemplo n.º 1
0
  public void smokeProductTab() throws Exception {

    waitForElementPresent(xpath(productTabsMenu));
    String productTab = input[11];

    if (isElementPresent(xpath(userOriginatorDetails))) {
      click(xpath(productTab));
    }

    Thread.sleep(3000);
  }
Exemplo n.º 2
0
  public void smokeAddProduct() throws Exception {
    Thread.sleep(35000);
    resultcount = 0;
    testCase = "RP Property Hub Add to cart: " + input[0];

    String addToCart = input[14];
    waitForElementPresent(xpath(addToCart));
    try {
      Assert.assertEquals("Add to cart", getValue(xpath(addToCart)));
    } catch (AssertionError e) {
      fail("Add to cart");
      takeScreenshot();
      resultcount++;
    }
    click(xpath(addToCart));

    if (resultcount != 0) {
      fail(testCase);
    } else {
      pass(testCase);
    }

    Thread.sleep(6000);
  }
Exemplo n.º 3
0
  public void smokeNotAvailableProduct() throws Exception {

    Thread.sleep(3000);

    resultcount = 0;
    testCase = "RP Property Hub Product Not Available: " + input[0];

    waitForElementPresent(xpath(input[14]));
    try {
      Assert.assertFalse(isElementPresent(xpath(input[14])));
    } catch (AssertionError e) {
      fail("Purchase button");
      takeScreenshot();
      resultcount++;
    }
    if (resultcount != 0) {
      fail(testCase);
    } else {
      pass(testCase);
    }
  }