Пример #1
0
 //private methods
 private bool WebElementExist(By findBy)
 {
     if (_helper.ElementExist(findBy))
     {
         return(_helper.GetElementWait(findBy).Displayed);
     }
     return(false);
 }
Пример #2
0
        public bool StatusColorIsOk(string status, string hexacolor)
        {
            if (status.Equals("Processing"))
            {
                if (!_helper.ElementExist(processingStatusElement.findsBy))
                {
                    throw new Exception("Theres any element with the given status: " + status);
                }

                return(CheckStatusColor(processingStatusElement, hexacolor));
            }

            if (status.Equals("Shipped"))
            {
                if (!_helper.ElementExist(shippedStatusElement.findsBy))
                {
                    throw new Exception("Theres any element with the given status: " + status);
                }

                return(CheckStatusColor(shippedStatusElement, hexacolor));
            }

            if (status.Equals("Canceled"))
            {
                if (!_helper.ElementExist(canceledStatusElement.findsBy))
                {
                    throw new Exception("Theres any element with the given status: " + status);
                }

                return(CheckStatusColor(canceledStatusElement, hexacolor));
            }

            //undefined status
            if (!_helper.ElementExist(canceledStatusElement.findsBy))
            {
                throw new Exception("Theres any element with the given status: " + status);
            }

            return(CheckStatusColor(undefinedStatusElement, hexacolor));
        }