public void verifyTextBoxMobilePhoneNumber(OverviewTab overviewTab, UserProfile overviewData) throws Exception { String mobile = overviewTab.getTextBoxMobileNumber(); String verifyWorkMobileNumberPresentInTextBox = mobile.replaceAll("-", ""); Assert.assertEquals( verifyWorkMobileNumberPresentInTextBox, overviewData.getMobilePhone(), "Mobile nos not found"); AutomationLog.info("Expected Mobile Number found As per the Text Box"); }