public static void PressTab(this SeleniumWrapper wrapper) { new Actions(wrapper.driver) .SendKeys(Keys.Tab) .Perform(); }
public static void SetFile(this SeleniumWrapper wrapper, string selector, string filePath) { var element = wrapper.driver.FindElementByCssSelector(selector); element.SendKeys(filePath); }
public static void PressEnter(this SeleniumWrapper wrapper, string selector) { wrapper.driver .FindElementByCssSelector(selector) .SendKeys(Keys.Enter); }
public static void SetFile(this SeleniumWrapper wrapper, string selector) { var value = Guid.NewGuid(); wrapper.SetFile(selector, $"Teste_{value}.txt", value.ToString()); }
public static void SendText(this SeleniumWrapper wrapper, string text) { new Actions(wrapper.driver) .SendKeys(text) .Perform(); }
public static void SetImplicityWait(this SeleniumWrapper wrapper, int milliseconds) { wrapper.currentTimeoutInMilliseconds = milliseconds; wrapper.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMilliseconds(wrapper.currentTimeoutInMilliseconds); }
public static void GoToUrl(this SeleniumWrapper wrapper, string url) { wrapper.driver.Navigate().GoToUrl(url); }
public static void MinimizeWindow(this SeleniumWrapper wrapper) => wrapper .driver .Manage() .Window .Minimize();