public List <ThemeModel> GetAllThemes(string levelTag, int subjectId) { var subject = GetSubject(levelTag, subjectId); var subjectPage = new SubjectPage(Driver, subject.Url); var themeList = subjectPage.GetAllThemes().Select(o => new ThemeModel { ThemeId = o.ThemeId, Name = o.Name, Url = o.Url }).ToList(); return(themeList); }
public SubjectModel GetSubject(string levelTag, int subjectId) { var subjectList = GetAllSubjects(levelTag); var subject = subjectList.FirstOrDefault(o => o.SubjectId == subjectId); var subjectPage = new SubjectPage(Driver, subject.Url); subject.Themes = subjectPage.GetAllThemes().Select(o => new ThemeModel { ThemeId = o.ThemeId, Name = o.Name, Url = o.Url }).ToList(); subject.Categories = subjectPage.GetAllCategories().Select(o => new CategoryModel { Id = o.Id, Name = o.Name }).ToList(); return(subject); }