// [Test, Description("Verify User is able to Upload an Image in Media Screen")] public void TC_01_ValidationOfUploadImage() { try { String TestName = (TestContext.CurrentContext.Test.Name.ToString()); String description = TestContext.CurrentContext.Test.Properties.Get("Description").ToString(); CreateTest(TestName, description); Console.WriteLine("Entered into testcase"); AuthoringScreenEnhancements auth = new AuthoringScreenEnhancements(driver); System.Threading.Thread.Sleep(8000); auth.ClickMedia(); System.Threading.Thread.Sleep(8000); auth.UploadImage(); System.Threading.Thread.Sleep(2000); String path1 = TakeScreenshot(driver); auth.SuccessScreenshot(path1, "Uploaded New Image"); AddProjectPage addProject = new AddProjectPage(driver); addProject.ClickNotifications(); System.Threading.Thread.Sleep(5000); String str = addProject.GetNotificationName(); result = str.Split(new[] { ':' }).Skip(1).FirstOrDefault(); Console.WriteLine("&&&&&" + result); String path2 = TakeScreenshot(driver); auth.SuccessScreenshot(path2, "Uploaded New Image" + result + " with Notification"); addProject.BackToProject(); System.Threading.Thread.Sleep(2000); auth.ClickDashboard(); } catch (AssertionException) { fail("Assertion failed"); throw; } }