コード例 #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);
  }
コード例 #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);
  }
コード例 #3
0
  public ShoppingCartPage clickCancel(WebDriver driver) {

    cancelButton.click();
    return PageFactory.initElements(driver, ShoppingCartPage.class);
  }
コード例 #4
0
 public ShoppingCartPage addSharedBackupServers(WebDriver driver) {
   allServersCheckButtonClick();
   addCartButtonClick(driver);
   return PageFactory.initElements(driver, ShoppingCartPage.class);
 }
コード例 #5
0
  public AccountPage goToCheckOut(WebDriver driver) {

    goToCheckoutLink.click();
    return PageFactory.initElements(driver, AccountPage.class);
  }
コード例 #6
0
  public ShoppingCartPage clickX(WebDriver driver) {

    WaitTool.waitForElementPresentAndVisible(driver, xToClose);
    xToClose.click();
    return PageFactory.initElements(driver, ShoppingCartPage.class);
  }