예제 #1
0
 public static void SendSpecialKeys(this DriverManager driver, string elementId, WebDriverKey key)
 {
     driver.SendSpecialKeys(elementId, new List <WebDriverKey> {
         key
     });
 }
예제 #2
0
 /// <summary>
 /// Takes a screenshot and saves in the current directory
 /// </summary>
 /// <param name="driver"></param>
 /// <param name="name"></param>
 public static void Screenshot(this DriverManager driver, string name)
 {
     driver.GetScreenshot().SaveAsFile(Path.Combine(Directory.GetCurrentDirectory(), name + ".png"), ImageFormat.Png);
 }
예제 #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)));
 }