public void ClickTab(IWebDriver driver, SellerDetailType text) { By location; switch (text) { case SellerDetailType.Language: location = languagesTab; break; case SellerDetailType.Skill: location = skillsTab; break; case SellerDetailType.Education: location = educationTab; break; case SellerDetailType.Certification: location = certificationTab; break; default: throw new ArgumentException("Illegal argument was passed '" + text.ToString("G") + "'"); } driver.ClickElement(location, 3); }
private IEnumerable <SearchableItem> CreateObjectsFromDataTable(SellerDetailType type, Table table) { switch (type) { case SellerDetailType.Language: return(table.CreateSet <Language>()); case SellerDetailType.Skill: return(table.CreateSet <Skill>()); case SellerDetailType.Education: return(table.CreateSet <Education>()); case SellerDetailType.Certification: return(table.CreateSet <Certification>()); default: throw new ArgumentException("Unknown type argument : " + type.ToString("G")); } }