Ejemplo n.º 1
0
        private string GetPrice(int index)
        {
            var priceSelect = new StaticControl(By.XPath(mainXpath + $"[{index}]" + priceSelectSubxpath));
            var priceText   = new StaticControl(By.XPath(mainXpath + $"[{index}]" + priceTextSubxpath));
            var result      = priceSelect.IsPresent ? priceSelect.element.Text : priceText.element.Text;

            return(Regex.Replace(result, "[^0-9.]", ""));
        }
Ejemplo n.º 2
0
    void Start()
    {
        drone            = GetComponent <Rigidbody>();
        radioControlList = (RadioControl[])Resources.FindObjectsOfTypeAll(typeof(RadioControl));

        GameObject c = GameObject.Find("StaticCanvas");

        staticControl = c.GetComponent <StaticControl> ();
    }
Ejemplo n.º 3
0
        public ResultRow(int index)
        {
            Position = index;
            Link     = new StaticControl(By.XPath(mainXpath + $"[{index}]" + linkToRaceSubxpath));
            var depTemp = new StaticControl(By.XPath(mainXpath + $"[{index}]" + dateSubxpath));

            if (!depTemp.IsPresent)
            {
                depTemp.ScrollDown();
            }
            Departure = DateTime.Parse(depTemp.element.Text);
        }
Ejemplo n.º 4
0
        public OrderCourirsEditingPage()
        {
            City          = new StaticText(By.Name("to_city__value__"));
            CityTo        = new AutocompleteControl(BY.NthOfClass("ajax-combobox", 0));
            DeclaredPrice = new TextInput(By.Name("declared_price"));
            Weight        = new TextInput(By.Name("weight"));
            Width         = new TextInput(By.Name("dimension_side1"));
            Height        = new TextInput(By.Name("dimension_side2"));
            Length        = new TextInput(By.Name("dimension_side3"));

            СountedButton = new ButtonInput(By.Name("recalc"));

            CanceledButton   = new ButtonInput(By.CssSelector("div.form-actions > input.btn.btn-primary.btn-success"));
            SaveChangeButton = new ButtonInput(By.CssSelector("div.form-actions > input.btn.btn-primary.pull-right"));

            BuyerPostalCode = new TextInput(By.Name("to_postal_code"));
            BuyerStreet     = new TextInput(By.Name("to_street"));
            BuyerHouse      = new TextInput(By.Name("to_house"));
            BuyerFlat       = new TextInput(By.Name("to_flat"));
            BuyerName       = new TextInput(By.Name("to_name"));
            BuyerPhone      = new TextInput(By.Name("to_phone"));
            BuyerPhoneAdd   = new TextInput(By.Name("to_add_phone"));
            BuyerEmail      = new TextInput(By.Name("to_email"));
            IsCargoVolume   = new CheckBox(By.Name("is_cargo_volume"));

            PaymentPrice     = new TextInput(By.Name("payment_price"));
            OrderNumber      = new TextInput(By.Name("shop_refnum"));
            GoodsDescription = new TextInput(By.Name("goods_description"));
            DeliveryDate     = new TextInput(By.Name("delivery_date_new"));
            DeliveryTimeFrom = new Select(By.Name("delivery_time_from"));
            DeliveryTimeTo   = new Select(By.Name("delivery_time_to"));
            OrderComment     = new TextInput(By.Name("order_comment"));
            ItemsCount       = new TextInput(By.Name("items_count"));

            ActionErrorText = new ErrorActionTextControl(By.ClassName("form-horizontal"));
            ErrorText       = new ErrorTextControl(By.ClassName("form-horizontal"));
            Countedloader   = new StaticControl(By.CssSelector("#radio_div > div > imj"));

            DeliveryList = new RadioButtonListControl("radio_div");
        }