public CategoryPage OpenCategoryPage(string category) { var menuItems = _currentPage.Menu.OpenMenu("Мужские часы"); var menuItem = menuItems.FirstOrDefault(item => item.Title.GetInnerHtml() == category); if (menuItem == null) { throw new Exception($"Could not find menu with title '{category}' on mainmenu."); } menuItem.Title.Click(); return((CategoryPage)(_currentPage = CategoryPage.WaitForPage(_driver))); }