Пример #1
0
 private bool VerifyColumn(UIItem column, string columnName)
 {
     if (column.GetText() == columnName)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
        public string VerifyAlerts()
        {
            //to do: add condition or entity types
            UIItem AlertElement     = null;
            UIItem AlertTextElement = null;

            try
            {
                switch (_Data.InvoiceStatus)
                {
                case "Awaiting Approval":
                    AlertElement     = _ChargesTab.AwaitingApprovalAlert;
                    AlertTextElement = _ChargesTab.AwaitingApprovalText;
                    break;

                case "In Process":
                    AlertElement     = _ChargesTab.InProcessAlert;
                    AlertTextElement = _ChargesTab.InProcessText;
                    break;

                case "Partial Payment":
                    AlertElement     = _ChargesTab.PartialPaymentAlert;
                    AlertTextElement = _ChargesTab.PartialPaymentText;
                    break;

                case "Paid":
                    AlertElement     = _ChargesTab.PaidAlert;
                    AlertTextElement = _ChargesTab.PaidText;
                    break;
                }
                Thread.Sleep(Constants.Wait_Medium);
                Assert.IsTrue(AlertElement.WaitUntilDisplayed());
                if (AlertTextElement.GetText() == _Data.AlertText)
                {
                    try
                    {
                        _LoadDetailsPage.ChargesTab_Factoring.Click();
                        _LoadDetailsPage.TopTab_Factoring.Click();
                    }
                    catch
                    {
                    }
                    return("VerifyAlertsSuccess");
                }
                else
                {
                    return("VerifyAlertsFailed");
                }
            }
            catch
            {
                return("VerifyAlertsFailed");
            }
        }