public void spring2_TC320() { try { //Declare requried Variable string[] res = new string[10]; string expectedMsg = "Item not found. Add new item to Inventory?"; string successMsg; Boolean itemMsg; //Retriving Data from Excel string name = TestContext.DataRow["name"].ToString(); string serialNo = TestContext.DataRow["serialNo"].ToString(); //create object for environment window = BrowserWindow.Locate("FDAdminDashBoard"); window.CloseOnPlaybackCleanup = false; //create object for page w = new WorkOrderPage(window); //Call workorder function res = w.workorder(name, window); //Validation Assert.AreEqual(res[0], "New Work Orders"); Assert.AreEqual(res[1], name); //Call SelectServiceProvider function w.SelectServiceProvider(window); //Call Click_create function w.Click_create(); //Call verifySuccessMsg function successMsg = w.verifySuccessMsg(); //Validation Assert.AreEqual(successMsg, "Work Order created successfully"); //Call AddItem function w.AddItem(serialNo); //Call verifyItemNotFound function itemMsg = w.verifyItemNotFound(expectedMsg); //Validation Assert.AreEqual(itemMsg, true); } finally { //post Condtion w.nav_Home(); } }