Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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");
     }
 }