Пример #1
0
        public void SelectValueStP()
        {
            WaitPresenceWithRetries();
            element.Click();
            Thread.Sleep(1000);
            element.SendKeys(Keys.Tab + Keys.Tab + Keys.Enter);

            var clickelement = new LinkMap(By.XPath("//div[3]/div[3]/h2"));
            var second       = 0;

Link:
            try
            {
                clickelement.WaitVisibleWithRetries();
                clickelement.WaitPresenceWithRetries();
                clickelement.Click();
            }
            catch (Exception)
            {
                if (second >= 1000)
                {
                    return;
                }
                Thread.Sleep(10);
                goto Link;
            }
            clickelement.WaitVisibleWithRetries();
        }
Пример #2
0
//        TODO все переписать
        public void SelectValueFirst(string value)
        {
            WaitPresenceWithRetries();
            if (GetAttributeValue("title").Contains(value))
            {
                return;
            }
            element.Click();
            Thread.Sleep(1000);
            element.SendKeys(Keys.Tab + Keys.Enter);

            var clickelement = new LinkMap(By.XPath("//div[3]/div[3]/h2"));
            var second       = 0;

Link:
            try
            {
                clickelement.WaitVisibleWithRetries();
                clickelement.WaitPresenceWithRetries();
                clickelement.Click();
            }
            catch (Exception)
            {
                if (second >= 1000)
                {
                    return;
                }
                Thread.Sleep(10);
                goto Link;
            }
            clickelement.WaitVisibleWithRetries();
        }