internal void ApplyForProperty() { try { LnqApply.Click(); ExcelLib.PopulateInCollection(Base.ExcelPath, "TenantDetails"); TxtNoOfTenant.SendKeys(ExcelLib.ReadData(2, "NoOfTenants")); TxtNote.SendKeys(ExcelLib.ReadData(2, "Notes")); Driver.wait(2); BtnSubmit.Submit(); } catch { throw; } }
internal void EditApplication() { try { LnqEdit.Click(); //validate page navigation bool bPage = Driver.driver.PageSource.Contains("Edit Rental Appliaction"); if (bPage) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Navigated to Edit Rental Application Page"); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Page details not verified"); } ExcelLib.PopulateInCollection(Base.ExcelPath, "TenantDetails"); //Verify if the Tenant Count field is enalbled bool bEnableField = TxtNoOfTenant.Enabled; if (bEnableField) { TxtNoOfTenant.SendKeys(ExcelLib.ReadData(2, "NoOfTenants")); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Tenant Count Field not enabled"); } bool bEnableNote = TxtNotes.Enabled; if (bEnableNote) { TxtNotes.SendKeys(ExcelLib.ReadData(2, "Notes")); Driver.wait(2); BtnSave.Submit(); //validate the success message?? } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Notes field not enabled"); } } catch (Exception Ex) { string exceptionMsg = Ex.Message; } }