private IWebElement ChooseTypeCapture(IWebElement element, Type?selectType) { if (!SelectorModalProxy.IsSelector(element)) { return(element); } if (selectType == null) { throw new InvalidOperationException("No type to choose from selected"); } return(element.AsSelectorModal().SelectAndCapture(TypeLogic.GetCleanName(selectType))); }