Exemplo n.º 1
0
  // Select 10 servers
  public ShoppingCartPage selectAllServersShareBackup(WebDriver driver) {

    // WaitTool.isElementPresentAndDisplay(driver, sharedBackupLabel);

    sharedBackupDropDown.click();

    input100GBradioButton.click();

    Constants.setTotalMes((PageUtils.getTotal(price100GBLabel) * 10) + Constants.TOTALMES);

    selectServersButton.click();
    WaitTool.waitForElementPresentAndVisible(driver, checkAllservers);
    checkAllservers.click();

    WebElement element =
        driver.findElement(By.xpath("//button[@class='action--click--add btn btn--large']"));
    JavascriptExecutor executor = (JavascriptExecutor) driver;
    executor.executeScript("arguments[0].click();", element);

    return PageFactory.initElements(driver, ShoppingCartPage.class);
  }
Exemplo n.º 2
0
  public AccountPage selectOptionShareBackupAgressiveCrossSell(WebDriver driver, String space) {

    WaitTool.isElementPresentAndDisplay(driver, sharedBackupLabel);

    optionList.click();

    WebElement option =
        driver.findElement(
            By.xpath("//div[@class='optionsList-item-name'][text()='" + space + " Backup']"));
    WebElement priceLabel =
        driver.findElement(
            By.xpath(
                "//div[@class='optionsList-item-name'][text()='"
                    + space
                    + " Backup']/../div[2]/span[1]"));

    Constants.setTotalMes(PageUtils.getTotal(priceLabel) + Constants.TOTALMES);
    option.click();

    addCartButton.click();

    return PageFactory.initElements(driver, AccountPage.class);
  }