public void OpenTopMenu(TopMenu element) { foreach (var top in topMenu) { if (element.Equals(top.Text)) { top.Click(); } } }