public void testBannerAddressDetails(PageBanner banner, UserProfile overviewData)
      throws Exception {
    String addressDetails = banner.getBannerAddressText();
    String addressToken[] = addressDetails.split(", ");
    Assert.assertEquals(
        addressToken[0],
        overviewData.getAddress1(),
        "The correct Address1 is not displayed in banner");
    AutomationLog.info("Updated address1 found in banner");

    Assert.assertEquals(
        addressToken[1],
        overviewData.getAddress2(),
        "The correct Address2 is not displayed in banner");
    AutomationLog.info("Updated address2  found in banner");

    Assert.assertEquals(
        addressToken[2], overviewData.getCity(), "The correct City is not displayed in banner");
    AutomationLog.info("Updated City found in banner");

    createStateAbbreviationMap();

    String stateAndZipcode[] = addressToken[3].split(" ");
    String abbreviation = getStateAbbreviation(overviewData.getState());
    Assert.assertEquals(
        stateAndZipcode[0], abbreviation, "The correct state is not displayed in banner");
    AutomationLog.info("Updated State found in banner");

    Assert.assertEquals(
        stateAndZipcode[1],
        overviewData.getZipCode(),
        "The correct Zipcode is not displayed in banner");
    AutomationLog.info("Updated Zip found in banner");
  }
 @Override
 public void setup() {
   super.setup();
   try {
     subnavigation = Page.subNavigation();
     String dropdownMoreOption = "Team";
     team = (Team) subnavigation.selectDropdownMoreOption(dropdownMoreOption);
     expectedTeamData = testCaseData.get("More->TeamPageData");
     expectedTeamData.put("url", team.teamPageUrl());
     AutomationLog.info("Redirection to Team page sucessfull");
   } catch (Exception e) {
     AutomationLog.error("Redirection to Team page failed");
   }
 }
 public void verifyTextBoxNeigborhood(OverviewTab overviewTab, UserProfile overviewData)
     throws Exception {
   String verifyNeighborhoodPresentInTextBox = overviewTab.getMultipleSelectNeighborhood();
   Assert.assertEquals(
       verifyNeighborhoodPresentInTextBox, overviewData.getNeighbour(), "Neigborhood not found");
   AutomationLog.info("Expected Neighborhood found As per the Text Box");
 }
 public void verifyTextBoxComapnyName(OverviewTab overviewTab, UserProfile overviewData)
     throws Exception {
   String verifyComapnyNamePresentInTextBox = overviewTab.getTextBoxCompanyName();
   Assert.assertEquals(
       verifyComapnyNamePresentInTextBox, overviewData.getCompanyName(), "company name not found");
   AutomationLog.info("Expected Company Name found As per the Text Box");
 }
 public void verifyTextBoxAddress2(OverviewTab overviewTab, UserProfile overviewData)
     throws Exception {
   String verifyAddress2PresentInTextBox = overviewTab.getTextBoxAddress2();
   Assert.assertEquals(
       verifyAddress2PresentInTextBox, overviewData.getAddress2(), "Address2 not found");
   AutomationLog.info("Expected Address2 found As per the Text Box");
 }
 public void verifyBannerDetails(PageBanner banner, UserProfile overviewData) throws Exception {
   String newBannerNameAfterSavingOverviewData = banner.getBannerText();
   Assert.assertEquals(
       newBannerNameAfterSavingOverviewData,
       overviewData.getName(),
       "Expected name is not displayed in banner");
   AutomationLog.info("Updated Name displayed on Banner");
 }
 public void testBannerPhoneDetails(PageBanner banner, UserProfile overviewData) throws Exception {
   String phoneDetails = banner.getBannerWorkPhoneText();
   String phoneToken[] = phoneDetails.split(": ");
   String formattedPhoneNumber = formatPhoneNumber(overviewData.getWorkPhone());
   Assert.assertEquals(
       phoneToken[1], formattedPhoneNumber, "The correct Workphone is not displayed in banner");
   AutomationLog.info("Updated WorkPhone found in banner");
 }
 public void verifyTextBoxDescribeYourself(OverviewTab overviewTab, UserProfile overviewData)
     throws Exception {
   String verifydescribeYourselfPresentInTextBox = overviewTab.getTextBoxDescribeYorself();
   Assert.assertEquals(
       verifydescribeYourselfPresentInTextBox,
       overviewData.getDescribe(),
       "Describe yourself not found");
   AutomationLog.info("Expected Description found As per the Text Box");
 }
 public void verifyIfMoreThanFiveNeighborhoodsCanBeAddedInSpecializedNeighborhoods()
     throws Exception {
   overviewTab.clickOnNeighborhoodDropdown();
   Assert.assertEquals(
       overviewTab.msg_SelectionLimit().getText(),
       "You can only select 5 items",
       "Expected message is not shown");
   AutomationLog.info("Message is shown if try to add more than 5 neighborhoods ");
 }
コード例 #10
0
 public void verifyTextBoxWorkPhoneNumber(OverviewTab overviewTab, UserProfile overviewData)
     throws Exception {
   String work = overviewTab.getTextBoxWorkPhoneNumber();
   String verifyWorkPhoneNumberPresentInTextBox = work.replaceAll("-", "");
   Assert.assertEquals(
       verifyWorkPhoneNumberPresentInTextBox,
       overviewData.getWorkPhone(),
       "Workphone nos not found");
   AutomationLog.info("Expected Work Phone number found As per the Text Box");
 }
 private void verifyLeftMenu() throws Exception {
   leftMenu = Page.contentPagesLeftMenu();
   actualActiveLeftMenu = leftMenu.getCurrentlyActiveLink();
   expectedActiveLeftMenu = leftMenu.TeamLinkText();
   Assert.assertEquals(
       actualActiveLeftMenu,
       expectedActiveLeftMenu,
       "Left menu does not show My Team link as Active Link");
   AutomationLog.info("Left menu shows My Team link as Active Link");
 }
コード例 #12
0
 public void testBannerMobileDetails(PageBanner banner, UserProfile overviewData)
     throws Exception {
   String mobileDetails = banner.getBannerMobilePhoneText();
   String mobileToken[] = mobileDetails.split(": ");
   String formattedMobileNumber = formatPhoneNumber(overviewData.getMobilePhone());
   Assert.assertEquals(
       mobileToken[1],
       formattedMobileNumber,
       "The correct Mobile number is not displayed in banner");
   AutomationLog.info(" Updated MobileNumber found in banner");
 }
 public void verifyIfTheUserEnteredInvalidEmailAddress(
     ForgotPassword forgotpassword, HashMap<String, String> expectedEmailData) throws Exception {
   forgotpassword = populateEmailFieldAndRequestNewPassword(expectedEmailData);
   String invalidEmailAddress = forgotpassword.getErrorMessageOfInvalidEmail();
   Assert.assertEquals(
       invalidEmailAddress,
       expectedEmailData.get("invalidEmailErrorMsg"),
       "Expected error message for invalid email is not displayed in Forgot Password page");
   AutomationLog.info(
       "Expected error message for invalid email is not displayed in Forgot Password page");
 }
 public void setup() {
   super.setup();
   homePage = Homepage.homePage();
   try {
     header = Header.header();
     headerlogin = header.openHeaderLoginForm();
     loginPage = headerlogin.doInvalidLogin("", "");
     forgotPassword = loginPage.clickOnForgotPassword();
   } catch (Exception e) {
     AutomationLog.error("Could not navigate to Forgot Password Page");
   }
 }
  public void verifyBackToLoginLinkInForgotPasswordPage() throws Exception {
    LoginPage BackToLogin = forgotPassword.clickOnBackToLoginLink();
    Assert.assertEquals(
        BackToLogin.currentURL(),
        "https://www.agorafy.com/login",
        "The CurrentURL is not been not found");
    AutomationLog.info("The CurrentURL is been found");

    Assert.assertEquals(
        loginPage.LoginPageFormId_BackToLoginLink().isDisplayed(),
        true,
        "After cliking BackToLoginLink, Agorafy forgotpassword page not found the form id");
    AutomationLog.info(
        "After cliking BackToLoginLink, Agorafy forgotpassword page found the form id");

    Assert.assertEquals(
        loginPage.LoginPageHeading_BackToLoginLink(),
        "Log in",
        "After clicking BackToLoginLink ,Agorafy Password Page does not show correct page title");
    AutomationLog.info(
        "After clicking BackToLoginLink ,Agorafy Password Page shows correct page Title");
  }
コード例 #16
0
 public void addNeighborhoodsInSpecializedNeighborhoods(HashMap<String, String> getNeighborhood)
     throws Exception {
   overviewTab.clickOnNeighborhoodDropdown();
   overviewTab.selectNeighborhood(getNeighborhood.get("neighbor1"));
   overviewTab.clickOnNeighborhoodDropdown();
   overviewTab.selectNeighborhood(getNeighborhood.get("neighbor2"));
   overviewTab.clickOnNeighborhoodDropdown();
   overviewTab.selectNeighborhood(getNeighborhood.get("neighbor3"));
   overviewTab.clickOnNeighborhoodDropdown();
   overviewTab.selectNeighborhood(getNeighborhood.get("neighbor4"));
   overviewTab.clickOnNeighborhoodDropdown();
   overviewTab.selectNeighborhood(getNeighborhood.get("neighbor5"));
   AutomationLog.info("Successfully added Neighborhoods in Specialized Neighborhoods ");
 }
  public void verifyIfTheUserEnteredValidEmailAddress(
      ForgotPassword forgotpassword, HashMap<String, String> expectedEmailData) throws Exception {
    forgotpassword = populateEmailFieldAndRequestNewPassword(expectedEmailData);
    WaitFor.waitForPageToLoad(
        Page.driver,
        expectedEmailData.get("validMailNotReg"),
        forgotpassword.validEmailNotRegistered());

    String validEmailAddress = forgotpassword.getMessageOfValidEmailNotReg();
    Assert.assertEquals(
        validEmailAddress,
        expectedEmailData.get("validMailNotReg"),
        "Expected error message for valid email is not displayed in Forgot Password page");
    AutomationLog.info(
        "Expected error message for valid email is displayed in Forgot Password page");
  }
コード例 #18
0
  @Override
  public void setup() {
    super.setup();
    homePage = Homepage.homePage();
    try {
      header = Header.header();
      headerLoginForm = header.openHeaderLoginForm();

      HashMap<String, String> loginData = testCaseData.get("validCredential");
      String UserName = loginData.get("username");
      String Password = loginData.get("password");
      homePage = headerLoginForm.doSuccessfulLogin(UserName, Password);
      WaitFor.presenceOfTheElement(Page.driver, homePage.getHomepageGreetingsLocator());
      subnavigation = Page.subNavigation();
      dashboard = subnavigation.clickLinkMyDashboard();
      overviewTab = dashboard.editProfile();
    } catch (Exception e) {
      AutomationLog.error("Overview tab not found");
    }
  }
コード例 #19
0
 public void verifyIfClickingSpecializedNeighborhoodsShowsDropDownToSelectNeighborhoods()
     throws Exception {
   HashMap<String, String> getNeighborhood = testCaseData.get("NeighborHoods");
   overviewTab.clearSpecializedNeighborhoodsTextBox();
   addNeighborhoodsInSpecializedNeighborhoods(getNeighborhood);
   overviewTab.saveOverviewDetails();
   WaitFor.waitForPageToLoad(
       Page.driver,
       overviewTab.msg_SuccessAfterSave().getText(),
       overviewTab.neighborhoodlocator());
   List<String> neighbors = new ArrayList<String>();
   List<WebElement> elements = overviewTab.addedNeighborhoods();
   for (WebElement ele : elements) {
     neighbors.add(ele.getText());
   }
   Assert.assertEquals(
       neighbors.contains(getNeighborhood.get("neighbor1")),
       true,
       "Excpected neighborhood is not added");
   AutomationLog.info(
       "Clicking Specialized neighborhoods shows drop down to selects neighborhoods successfully");
 }
コード例 #20
0
 public void verifyTextBoxCity(OverviewTab overviewTab, UserProfile overviewData)
     throws Exception {
   String verifyCityPresentInTextBox = overviewTab.getTextBoxCity();
   Assert.assertEquals(verifyCityPresentInTextBox, overviewData.getCity(), "City not found");
   AutomationLog.info("Expected City found As per the Text Box");
 }
コード例 #21
0
 private void verifyIfEmailFieldIsEditable() throws Exception {
   Assert.assertEquals(overviewTab.default_Email().isEnabled(), false, "Field is editable");
   AutomationLog.info("Email field is not editable is Successful");
 }
 @Override
 protected void verifyTestCases() throws Exception {
   verifyLink(team, expectedTeamData);
   AutomationLog.info("Testing whether Team link is active in left side started...");
   verifyLeftMenu();
 }
コード例 #23
0
 public void verifyTextBoxState(OverviewTab overviewTab, UserProfile overviewData)
     throws Exception {
   String verifyStatePresentInTextBox = overviewTab.getDropdownState();
   Assert.assertEquals(verifyStatePresentInTextBox, overviewData.getState(), "State not found");
   AutomationLog.info("Expected State found As per the Text Box");
 }
コード例 #24
0
 public void verifyTextBoxZip(OverviewTab overviewTab, UserProfile overviewData) throws Exception {
   String verifyZipPresentInTextBox = overviewTab.getTextBoxZip();
   Assert.assertEquals(verifyZipPresentInTextBox, overviewData.getZipCode(), "Zip not found");
   AutomationLog.info("Expected Zip found As per the Text Box");
 }