Exemple #1
0
 public void Recognition_UploadAttachments_WS_1166_Sample3()
 {
     if (!DataParser.ReturnExecution("WS_1166"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1166.xml";
         AwardData.GetAwardImpact(_file);
         string user        = AwardData.GetAwardUserName(_file),
                award       = AwardData.GetAwardName(_file),
                value       = AwardData.GetAwardValue(_file),
                secondvalue = AwardData.GetAwardSecondValue(_file),
                file_name   = GeneralData.GetFileName(_file),
                reason      = AwardData.GetAwardMessage(_file),
                path_file   = GeneralData.GetPathFile(_file).Trim(),
                proxy_name  = ProxyData.GetProxyUserName(_file);
         //Scenario 2
         NominationHomePage recognitionPage = InitialPage.Go().Logon().ClickLogin().NavigateToAdminHomePage().LoginProxyAsuser()
                                              .EnterUserName(proxy_name).ProxyToMainHomePage().ClosePopUp().NavigateToNomination();
         recognitionPage
         .SearchEmployeeFound(user)
         .SelectAward(award)
         .SelectValues(value)
         .SelectValues(secondvalue)
         .FillReason(reason);
         recognitionPage.ClickUploadFile();
         for (var i = 0; i < 5; i++)
         {
             foreach (char a in path_file)
             {
                 SendKeys.SendWait(a.ToString());
                 Thread.Sleep(30);
             }
             SendKeys.SendWait("{ENTER}");
         }
         Assert.AreEqual("You can not upload any more files", recognitionPage.GetErrorMsgupload5Files(), "The file was upload correctly or the msg is not right");
     }
 }