コード例 #1
0
  public String SelectRule() {

    // select_box = Element.getPageElement(testConfig, How.xPath, "//tbody/tr[4]/td[5]/input");
    Element.click(testConfig, selectBox, "Clicking Active Checkbox");
    Element.click(testConfig, select_button, "Selecting a Rule");
    Element.verifyElementPresent(testConfig, rule_id, "Get Rule ID");
    String ruleid = rule_id.getText().toString();
    return ruleid;
  }
コード例 #2
0
 /**
  * Verifies presence of following elements Saltid,Change Alias button, Seamless Encryption Public
  * Key Download Button Store Card Public Key Upload Button
  */
 public void verifyUIElementsDisplayed() {
   Element.verifyElementPresent(testConfig, SaltId, "Salt ID");
   Element.verifyElementPresent(testConfig, LoginAlias, "Login Alias");
   Element.verifyElementPresent(testConfig, ChangeAliasButton, "Change Alias Button");
   Element.verifyElementPresent(
       testConfig,
       SeamlessEncryptionKeyDownloadButton,
       "Seamless Encryption Public Key Download Button");
   Element.verifyElementPresent(
       testConfig, StoreCardPublicKeyUploadButton, "Store Card Public Key Upload Button");
 }
コード例 #3
0
 public void DeleteExistingRules() {
   //	delete_button = Element.getPageElement(testConfig, How.xPath, "//tbody/tr[4]/td[6]/input");
   //	select_checkbox = Element.getPageElement(testConfig, How.xPath, "//tbody/tr[4]/td[5]/input");
   while (Element.IsElementDisplayed(testConfig, delete_button)) {
     Element.click(testConfig, selectBox, "Clicking Active Checkbox");
     Element.click(testConfig, delete_button, "Deleting Existing Rules");
     //	delete_button = Element.getPageElement(testConfig, How.xPath, "//tbody/tr[4]/td[6]/input");
     //	select_checkbox = Element.getPageElement(testConfig, How.xPath,
     // "//tbody/tr[4]/td[5]/input");
   }
 }
コード例 #4
0
 /**
  * Clicks on download public key
  *
  * @return path to downloaded public key file
  */
 public String downloadSeamlessEncryptionPublicKey() {
   Element.click(
       testConfig,
       SeamlessEncryptionKeyDownloadButton,
       "Seamless Encryption Public Key Download Button");
   String DownloadPath = System.getProperty("user.home") + "\\Downloads";
   String PublicKeyPath =
       Browser.DesiredFileDownload(testConfig, DownloadPath, "PublicKey").getAbsolutePath();
   return PublicKeyPath;
 }
コード例 #5
0
  /**
   * Reads the "CardDetails" sheet of Test Data excel and fill the credit card details
   *
   * @param cardRow Row number of excel sheet to be filled in
   * @return Returns the Excel sheet data which was filled
   */
  public TestDataReader FillCardDetails(int cardRow) {
    TestDataReader data = new TestDataReader(testConfig, "CardDetails");

    String value = "";

    value = data.GetData(cardRow, "CC");
    Element.enterData(testConfig, creditCardNumber, value, "Card Number");

    value = data.GetData(cardRow, "Name");
    Element.enterData(testConfig, creditCardName, value, "Name on Card");

    value = data.GetData(cardRow, "CVV");
    Element.enterData(testConfig, creditCardCvvNo, value, "CVV");

    value = data.GetData(cardRow, "Mon");
    Element.selectValue(testConfig, creditCardExpiryMonth, value, "Expiry month");

    value = data.GetData(cardRow, "Year");
    Element.selectValue(testConfig, creditCardExpiryYear, value, "Expiry year");

    return data;
  }
コード例 #6
0
  /**
   * Verifies Alias input as follows Stores current alias for future Checks error message for more
   * than 20 characters Alias Checks error message for special characters Alias Checks confirm
   * button disabled for blank/current alias Reverts alias to previous value
   *
   * @param validationMessage
   */
  public void verifyAliasInputFieldValidations(HashMap<String, String> validationMessage) {
    clickChangeAliasButton();
    // Store the current Alias
    String currentAlias = OldAliasInput.getAttribute("value");
    // Enter a new alias
    String NewAlias = Helper.generateRandomAlphabetsString(6);
    Element.enterData(testConfig, NewAliasInput, NewAlias, "New Alias Input");
    Element.click(testConfig, uploadAndProcess, "Submit Alias Changes");

    verifyNotificationText(validationMessage.get("AliasChangeSuccessful"));
    clickChangeAliasButton();
    // Verify alias was changed
    Helper.compareEquals(
        testConfig, "Old Alias Value", NewAlias, OldAliasInput.getAttribute("value"));
    // More than 20 characters
    Element.enterData(
        testConfig, NewAliasInput, Helper.generateRandomAlphaNumericString(30), "New Alias Input");
    Element.click(testConfig, uploadAndProcess, "Submit Alias Changes");
    Element.waitForElementDisplay(testConfig, ErrorMessageOnPopUp);
    Helper.compareEquals(
        testConfig,
        "Error Message",
        validationMessage.get("LongAliasErrorMessage"),
        ErrorMessageOnPopUp.getText());
    // Special Characters
    Element.enterData(testConfig, NewAliasInput, "!@##$$$$", "New Alias Input");
    Element.click(testConfig, uploadAndProcess, "Submit Alias Changes");
    Helper.compareEquals(
        testConfig,
        "Error Message",
        validationMessage.get("SpecialCharacterInAliasErrorMessage"),
        ErrorMessageOnPopUp.getText());
    // Existing Alias
    String ExistingAlias = OldAliasInput.getAttribute("value");
    Element.enterData(testConfig, NewAliasInput, ExistingAlias, "New Alias Input");
    Helper.compareTrue(testConfig, "Confirm button is disabled", (!uploadAndProcess.isEnabled()));

    // Blank Value
    Element.enterData(testConfig, NewAliasInput, "", "New Alias Input");
    Helper.compareTrue(testConfig, "Confirm button is disabled", (!uploadAndProcess.isEnabled()));

    // Enter Older value of alias and save changes
    Element.enterData(testConfig, NewAliasInput, currentAlias, "New Alias Input");
    Element.click(testConfig, uploadAndProcess, "Submit Alias Changes");
    verifyNotificationText(validationMessage.get("AliasChangeSuccessful"));
  }
コード例 #7
0
 /** Clicks on Change alias button and waits for pop up to appear */
 public void clickChangeAliasButton() {
   Element.click(testConfig, ChangeAliasButton, "Change Alias Button");
   Element.waitForElementDisplay(testConfig, OldAliasInput);
 }
コード例 #8
0
 /**
  * Verifies browse file form disappears when clicked on cancel Clicks on Store Card Public Key
  * Button Clicks on Cancel Button Verifies Form is no longer present
  */
 public void verifyCancelButtonOnUploadPublicKey() {
   clickOnUploadStorecardButton();
   Element.click(testConfig, cancelButton, "cancel button");
   Element.verifyElementNotPresent(
       testConfig, browseFileForm, "Browse and upload " + "public key form");
 }
コード例 #9
0
 /** Clicks on Store Card Public Key Button Waits for browse file form */
 public void clickOnUploadStorecardButton() {
   Element.click(testConfig, StoreCardPublicKeyUploadButton, "Store Card Public Key Button");
   Browser.waitForPageLoad(testConfig, browseFileForm);
 }
コード例 #10
0
 /**
  * Uploads store card public key Clicks on Store Card Public Key Button Enters file name Clicks on
  * upload and process button
  *
  * @param FilePathToPublicKey
  */
 public void uploadStoreCardPublicKey(String FilePathToPublicKey) {
   clickOnUploadStorecardButton();
   Element.enterFileName(testConfig, browseFileButton, FilePathToPublicKey, "Browse file button");
   Element.click(testConfig, uploadAndProcess, "upload and process button");
 }
コード例 #11
0
 public void enterCCNumber(String strCCNumber) {
   Element.enterData(testConfig, creditCardNumber, strCCNumber, "Card Number");
 }
コード例 #12
0
 public IframeCCTab clickIframeCCPayment() {
   Element.KeyPress(testConfig, creditCardMakePayment, Keys.RETURN, "CreditCard MakePayment");
   return new IframeCCTab(testConfig);
 }
コード例 #13
0
 /**
  * Click make payment and get the Test Response Page
  *
  * @return
  */
 public TestResponsePage clickIframeCCPaymentToGetTestResponsePage() {
   Element.KeyPress(testConfig, creditCardMakePayment, Keys.RETURN, "CreditCard MakePayment");
   return new TestResponsePage(testConfig);
 }