public void verifyItemPurchased() { ordefrHistoryPage = searchItemPage.ClickOrderHistoryAndDetails(); ordefrHistoryPage.ValidateDateTime(); orderHistoryDetailsPage = ordefrHistoryPage.ClickOnOrderReference(); orderHistoryDetailsPage.SelectItem(1); orderHistoryDetailsPage.AddComment("Test Comments"); messageSent = orderHistoryDetailsPage.ClickSubmitMessage(); messageSent.VerifyMessageSentMessage(); messageSent.VerfyCommentText("Test Comments"); messageSent.ClickLogout(); }
public void CaptureFailureScreenshot() { try { ordefrHistoryPage = searchItemPage.ClickOrderHistoryAndDetails(); ordefrHistoryPage.ValidateDateTime(); orderHistoryDetailsPage = ordefrHistoryPage.ClickOnOrderReference(); orderHistoryDetailsPage.SelectItem(1); orderHistoryDetailsPage.AddComment("Test Comments"); messageSent = orderHistoryDetailsPage.ClickSubmitMessage(); messageSent.VerifyMessageSentMessage(); messageSent.VerfyCommentText("Test"); messageSent.ClickLogout(); } catch (Exception ex) { string date = DateTime.Now.ToString("HHmmss"); ((ITakesScreenshot)DriverContext.driver).GetScreenshot().SaveAsFile(@"C:\Users\vikram.mahurkar\source\repos\TestProject\Screenshot\" + date + "Img.png"); } }