public static DropdawnMenu GetByLabel(IWebDriver driver, string label) { var pathStr = $"(//div[contains(@class, 'row')]/label[contains(text(), '{label}') " + $"and parent::*[not(contains(@style, 'display: none'))]]/..)[parent::*[not(contains(@style, 'display: none'))]]"; DropdawnMenu result = new DropdawnMenu(driver, pathStr); return(result); }
public static DropdawnMenu GetDropdownmenuByLabel(this IWebDriver driver, string label) { return(DropdawnMenu.GetByLabel(driver, label)); }