public void TC011_VerifyWhenAutomationCreatesRITM(string strmobiledevice) { starttime = DateTime.Now; strMessage = string.Format("\r\n\t " + TestContext.CurrentContext.Test.Name + " Starts"); _driver = _testengine.TestSetup(strmobiledevice); _homescreen1 = new HomeScreen1(_driver, "NR"); _asknowpage = new AskNowPage(_driver, "NR"); DataTable AddReturnInPerson = ExcelReader.ReadExcelFile("EquipmentReturn", "AutomationExist", true); int rowcount = AddReturnInPerson.Rows.Count; string[] empId = new string[rowcount]; string[] isvalidRITM = new string[rowcount]; for (int j = 0; j < rowcount; j++) { Dictionary <string, string> AddUserTestData = AddReturnInPerson.Columns .Cast <DataColumn>().ToDictionary(col => col.ColumnName, col => AddReturnInPerson.Rows[j][col].ToString()); empId[j] = AddUserTestData["EmpId"]; isvalidRITM[j] = AddUserTestData["isvalidRITM"]; } for (int i = 0; i < rowcount; i++) { _driver.Url = WebuiURL; bool flag = false; do { _homescreen1.EnterEmpID(empId[i]); _homescreen1.PressTabonEmpID(); if (isvalidRITM[i] == "True") { Assert.IsFalse(_homescreen1.VerifyOracleIDNotFoundPopUp()); Assert.IsNotEmpty(_homescreen1.GetFirstNameText()); Assert.IsNotEmpty(_homescreen1.GetLastNameText()); Assert.IsNotEmpty(_homescreen1.GetEmailText()); Assert.IsNotEmpty(_homescreen1.GetPhoneNumberText()); } else if (isvalidRITM[i] == "False") { Assert.IsTrue(_homescreen1.VerifyOracleIDNotFoundPopUp()); } string ReqNumber = _homescreen1.FetchREQNumber(); _asknowpage.FetchRITMParameters(ReqNumber, 1, "Non-Responder - Returner"); } while (flag); } }