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"); }
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"); }