public ProductManagerPage ClickProductManagerMenuItem() { var menuItem = By.XPath("//div[@id='sidebar']//span[text()='Product Manager']"); if (_driver.FindElements(menuItem).Count(x => x.Displayed && x.Enabled) == 0) { GetProductMenu.Click(); } var submenu = _driver.FindElementWait(menuItem); submenu.Click(); var page = new ProductManagerPage(_driver); return(page); }
public BetLevelsPage ClickBetLevelsMenuItem() { var menuItem = By.XPath("//div[@id='sidebar']//span[text()='Bet Limits']"); if (_driver.FindElements(menuItem).Count(x => x.Displayed && x.Enabled) == 0) { GetProductMenu.Click(); } Thread.Sleep(1000);// to slow down webdriver here _driver.ScrollPage(0, 800); var submenu = _driver.FindElementWait(menuItem); submenu.Click(); var page = new BetLevelsPage(_driver); return(page); }