private ElemsType FindElements(SelBy seleniumBy) { ElemsType elements = new ElemsType(this); try { var tmp = Instance.FindElements(seleniumBy).ToList(); elements.SetElements(tmp); return(elements); } catch (Exception) { //// No errors -- as designed } return(elements); }
private ElemType FindElement(SelBy seleniumBy) { ElemType element = new ElemType(this); try { var tmp = Instance.FindElement(seleniumBy); element.SetElement(tmp); return(element); } catch (Exception ex) { Debug.WriteLine(ex.ToString()); //// No errors -- as designed } return(element); }
private ElemsType FindIfrElements(BaseClasses.By by) { switch (by.CurrType) { case (int)BaseClasses.By.PossibleTypes.Class: return(FindElements(SelBy.ClassName(by.CurrValue))); case (int)BaseClasses.By.PossibleTypes.CssSelector: return(FindElements(SelBy.CssSelector(by.CurrValue))); case (int)BaseClasses.By.PossibleTypes.Id: return(FindElements(SelBy.Id(by.CurrValue))); case (int)BaseClasses.By.PossibleTypes.Name: return(FindElements(SelBy.Name(by.CurrValue))); case (int)BaseClasses.By.PossibleTypes.Xpath: return(FindElements(SelBy.XPath(by.CurrValue))); } throw new Exception("Something going wrong, dude!"); }