public void PopulateCoursesWithLessons(UonWebsiteNavigator navigator)
		{
			foreach (var course in this)
			{
				course.AddAllLessons(navigator.NavigateToAndFindLessonTable(course));
				navigator.ReturnToCourseSelectionPage();
			}
		}
Esempio n. 2
0
        CourseCollection GetAndProcessCourses(UonWebsiteNavigator navigator)
        {
            Console.WriteLine("Getting course codes...");
            CourseCollection courses = new CourseCollection();

            courses.GetCourses(navigator.FindCourseDropDownOptions());

            CourseCodeSuccessReport(courses);

            return(courses);
        }
Esempio n. 3
0
        void GatherDataFromUonWebsite()
        {
            using (var driver = new ChromeDriver("E:\\Documents\\DevStuff\\Dev Stuff\\Uon Timetable Generator\\UonCoursesHTMLParser\\UonCoursesHTMLParser\\"))
            {
                Console.WriteLine("Scraper navigating to website...");
                var navigator = new UonWebsiteNavigator(driver);
                navigator.NavigateToUonWebsite();

                var courses = GetAndProcessCourses(navigator);

                Console.WriteLine("Populating successfully processed courses with available lessons");
                courses.PopulateCoursesWithLessons(navigator);
            }
        }