Пример #1
0
        /// <summary>
        /// Send to send tab keys to an element
        /// </summary>
        /// <param name="driver">The driver being extended</param>
        /// <param name="element">The element to send the tabs to</param>
        /// <param name="count">The number of times to send tab</param>
        public static void SendTabs(this DriverManager driver, string element, int count)
        {
            var tabs = new List <WebDriverKey>();

            for (var i = 0; i < count; i++)
            {
                tabs.Add(WebDriverKey.Tab);
            }
            driver.SendSpecialKeys(element, tabs);
        }
Пример #2
0
 public static void SendSpecialKeys(this DriverManager driver, string elementId, WebDriverKey key)
 {
     driver.SendSpecialKeys(elementId, new List <WebDriverKey> {
         key
     });
 }
Пример #3
0
 /// <summary>
 /// Send to send tab keys to an element
 /// </summary>
 /// <param name="driver">The driver being extended</param>
 /// <param name="element">The element to send the tabs to</param>
 /// <param name="count">The number of times to send tab</param>
 public static void SendTabs(this DriverManager driver, string element, int count)
 {
     driver.SendSpecialKeys(element, String.Concat(Enumerable.Repeat("Tab", count)));
 }