public void spring2_TC315() { try { //Declare requried Variable string res, errormsg,productName; //Retriving Data from Excel 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 nav_createWorkorder function res = w.nav_createWorkorder(window); //Call nav_createWorkorder function w.AddItem(serialNo); //Call nav_createWorkorder function productName = w.verifyProductName(); //Validation Assert.AreEqual(productName, ""); //Call nav_createWorkorder function errormsg = w.verifyErrorMsg(); //Validation Assert.AreEqual(errormsg, "Required"); } finally { //post Condtion w.nav_Home(); } }