/// <summary> /// Selects the first class available from the Class Picker in toolbar /// </summary> /// <returns></returns> public string SelectFirstClassFromQuickLink() { var quickLinkClassPicker = WebContext.WebDriver.FindElement(By.CssSelector("[data-automation-id='QuickLinkClassPicker']")); quickLinkClassPicker.Click(); string selectedClass = ""; var list = WebContext.WebDriver.FindElement(By.CssSelector(".mega-menu-list")); IList <IWebElement> classLabels = list.FindElements(By.CssSelector(".mega-menu-list-item")); if (classLabels.Count > 0) { selectedClass = classLabels[0].GetText(); classLabels[0].Click(); ElementAccessor.WaitForAjaxReady(By.CssSelector(".locking-mask-loading")); } return(selectedClass); }