/// <summary> /// Clicks the input element and moves the cursor to the top-left corner of /// the screen to avoid hover artifacts. /// </summary> /// <param name="driver"></param> /// <param name="element"></param> public static void ClickAndMove(IWebDriver driver, IWebElement element) { element.Click(); SeleniumUtils.MoveToTopLeft(driver); }
/// <summary> /// Clicks the location indicated by the specified offset from the top-left /// corner of the specified element, and moves the cursor to the top-left /// corner of the screen to avoid hover artifacts. /// </summary> /// <param name="driver"></param> /// <param name="element"></param> /// <param name="offset"></param> public static void ClickAndMove(IWebDriver driver, IWebElement element, Point offset) { Click(driver, element, offset); SeleniumUtils.MoveToTopLeft(driver); }