/// <summary> /// Zooms in or out by clicking on zoom buttons. /// </summary> /// <param name="delta"></param> /// <returns></returns> public virtual ModelPage ZoomByMenuButton(int delta) { ArgumentGuard.NotEquals(delta, 0, nameof(delta)); Driver.FindElement(By.CssSelector(ZoomMenuButtonSelector_)).Click(); IWebElement zoomButton; if (delta > 0) { zoomButton = Driver.FindElement( By.CssSelector(ZoomInButtonSelector_)); } else { zoomButton = Driver.FindElement( By.CssSelector(ZoomOutButtonSelector_)); } SeleniumUtils.MoveToElement(Driver, zoomButton); delta = Math.Abs(delta); while (--delta >= 0) { zoomButton.Click(); WaitForZoomTransitionToEnd_(); } SeleniumUtils.MoveToTopLeft(Driver); return(this); }
/// <summary> /// Hovers over the window image of the input id. /// </summary> /// <param name="windowId"></param> /// <returns></returns> public ModelPage HoverOverWindow(string windowId) { SeleniumUtils.MoveToElement(Driver, GetWindowImageElement_(windowId)); Thread.Sleep(2000); return(this); }
public ModelPage ClickWindowImage(string windowId) { var windowElement = GetWindowImageElement_(windowId); windowElement.Click(); SeleniumUtils.MoveToElement(Driver, windowElement, 0, -40); WaitForBirdViewNewRoot_(); return(this); }
/// <summary> /// Double clicks the image of the window of the input id. /// </summary> /// <param name="windowId"></param> /// <returns></returns> public ModelPage DoubleClickWindowImage(string windowId) { var windowElement = GetWindowImageElement_(windowId); SeleniumUtils.DoubleClick(Driver, windowElement); SeleniumUtils.MoveToElement(Driver, windowElement, 0, -40); ModelWindowPage windowPage = new ModelWindowPage(Driver); windowPage.WaitUntilReady(); return(windowPage); }