Exemplo n.º 1
0
 // Enter creditcard information
 public void setCreditcardInfo(AMPTestData billingaddress) {
   Dropdown_CrediCardType.get().selectByValue(billingaddress.getPaymentInfo_creditcardtype());
   Input_CreditcardNo.enterText(billingaddress.getPaymentInfo_creditcardno());
   DropDown_CCMonth.get().selectByValue(billingaddress.getPaymentInfo_expirymonth());
   DropDown_CCYear.get().selectByValue(billingaddress.getPaymentInfo_expiryyear());
   Input_CVC.enterText(billingaddress.getPaymentInfo_cvcno());
   submit_btn.click();
 }
Exemplo n.º 2
0
  // set billing address
  public void setBillingAddress(AMPTestData billingaddress) {

    // vehicleType.get().selectByValue(dealerInfo.getDealerInfo_vehicletype());
    String Checkboxonoff = billingaddress.getPaymentInfo_billinsameasprimaryonoff().toLowerCase();
    if (Checkboxonoff == "on") {
      if (!CheckBox_BillingAsPrimary.isSelected()) {
        // Checking the checkbox
        CheckBox_BillingAsPrimary.click();
      }
    } else if (Checkboxonoff == "off") {
      if (CheckBox_BillingAsPrimary.isSelected()) {
        // Unchecking the checkbox
        CheckBox_BillingAsPrimary.click();
        // Entering the Address details
        DropDown_CCPrefix.get().selectByValue(billingaddress.getPaymentInfo_prefix());
        Input_CCFirstName.enterText(billingaddress.getPaymentInfo_firstname());
        Input_CCLastName.enterText(billingaddress.getPaymentInfo_lastname());
        Dropdown_CCCountry.get().selectByValue(billingaddress.getPaymentInfo_country());
        Input_CCAddress1.enterText(billingaddress.getPaymentInfo_address1());
        Input_CCAddress2.enterText(billingaddress.getPaymentInfo_address2());
        Input_CCCity.enterText(billingaddress.getPaymentInfo_city());
        DropDown_CCState.get().selectByValue(billingaddress.getPaymentInfo_state());
        Input_CCZip.enterText(billingaddress.getPaymentInfo_zipcode());
      }
    }
  }