internal void EditRequestMethod() { try { ExcelLib.PopulateInCollection(Base.ExcelPath, "TenantMyRequest"); //validate if User is on My requests page Driver.driver.PageSource.Contains("My Requests"); //Get Job Description from Excel sheet and search TxtSearchBar.SendKeys(ExcelLib.ReadData(2, "Job Description")); BtnSearch.Click(); Driver.wait(2); LnqSortBy.Click(); //validate if Job Description is as selected string JobDescription = Driver.driver.FindElement(By.XPath("html/body/div/section/div[1]/div[5]/div[1]/div/div/div/div[2]/div[3]/div/div[2]/span")).Text; JobDescription.Contains(ExcelLib.ReadData(2, "Job Description")); //Edit the Job Description and Submit the form LnqEdit.Click(); TxtDescription.SendKeys(ExcelLib.ReadData(2, "New Description")); BtnSave.Submit(); //Validate the success message //string message = Driver.driver.FindElement(By.XPath("html/body/div/section/div[3]/div[2]/form")).Text; string message = Driver.driver.SwitchTo().Alert().Text; Assert.AreEqual(message, "Item edited successfully"); } catch (Exception Ex) { throw Ex; } }