/// <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); }