/// <summary> /// Selects the terms in the terms textbox /// </summary> /// <param name="terms">A list of terms</param> public static void SelectTerm(string[] terms) { Browser.FindClickableElement("xpath", "//*[@id='js-modal-page']/div/div[2]/div[1]/div[3]/div[1]/div[3]/div[2]/div[1]").Click(); foreach (string term in terms) { var dropdownOptions = Browser.FindElements("xpath", "//*[@id='js-modal-page']/div/div[2]/div[1]/div[3]/div[1]/div[3]/div[2]/div[2]/div/div"); foreach (IWebElement option in dropdownOptions) { if (option.Text == term) { option.Click(); break; } } } }
/// <summary> /// Clicks on the Clear Filters button /// </summary> public static void ClearFilters() { Browser.FindClickableElement("id", "btnClear").Click(); }
/// <summary> /// Clicks on the search button /// </summary> public static void SearchForCourses() { Browser.FindClickableElement("xpath", "//*[@id='searchButton']").Click(); }