示例#1
0
        public bool CheckForExecution(int number)
        {
            IList <NgWebElement> allElements = _driver.FindAllElements(AllTextTask);
            bool check = _driver.CheckClassForElement(allElements[number], "done-true");

            return(check);
        }
示例#2
0
        public void SelectCPU(CpuType cpuType)
        {
            _driver.WaitForElementIsVisible(Filter);
            var proc = _driver.GetElement(ShowOtherCPU);

            _driver.Scroll((proc.Location.Y).ToString());
            if (!_driver.CheckClassForElement(FilterPopoverVisible, "schema-filter-popover_visible"))
            {
                _driver.Click(ShowOtherCPU);
            }
            _driver.WaitForElementIsVisible(FilterPopoverVisible);
            _driver.Click(CreateOrderLocator(cpuType));
            WaitComplitePrice();
        }
        private OrderType GetOrdertypeCheckout()
        {
            Dictionary <By, OrderType> selectOrder = new Dictionary <By, OrderType>()
            {
                { CreateOrderLocator(OrderType.Popular), OrderType.Popular },
                { CreateOrderLocator(OrderType.PriceASC), OrderType.PriceASC },
                { CreateOrderLocator(OrderType.PriceDESC), OrderType.PriceDESC },
                { CreateOrderLocator(OrderType.New), OrderType.New },
                { CreateOrderLocator(OrderType.Rating), OrderType.Rating },
            };

            foreach (var element in selectOrder)
            {
                if (_driver.CheckClassForElement(element.Key, "schema-order__item_active"))
                {
                    return(element.Value);
                }
            }

            return(OrderType.Popular);
        }