public void SelectPupil() { SeleniumHelper.WaitUntilElementIsDisplayed(_pupilXpath + "[1]"); ElementRetriever.FindElementSafe(WebContext.WebDriver, _firstPupilSelector).Click(); Wait.WaitUntilDisplayed(_firstSelectedPupilSelector); }
public static bool TestAddressBookLinkPresence(SeleniumHelper.iSIMSUserType userType) { SeleniumHelper.Login(userType); TaskMenuBar taskMenuInstance = new TaskMenuBar(); taskMenuInstance.WaitForTaskMenuBarButton(); return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch))); }
public QuickAddBehaviourDialog OpenBehaviourPopup() { By behaviourLinkSelector = SimsBy.Xpath("//*/a[@data-class-log-conduct-event='behaviourlink']"); ElementRetriever.FindElementSafe(WebContext.WebDriver, behaviourLinkSelector).Click(); AutomationSugar.WaitForAjaxCompletion(); // Arbitrary but assume that if the title is displayed then the dialog has loaded? Wait.WaitForElementDisplayed(SimsBy.AutomationId("record_behaviour_popup_header_title")); return(new QuickAddBehaviourDialog()); }
/// <summary> /// sets the values of name and description properties /// </summary> public void setMarksheetProperties(string name, string description) { //WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout)); //waiter.Until(ExpectedConditions.ElementExists(MarksheetConstants.MarksheetName)); //waiter.Until(ExpectedConditions.ElementExists(MarksheetConstants.MarksheetDescription)); //WebContext.WebDriver.FindElement(MarksheetConstants.MarksheetName).SendKeys(name); //WebContext.WebDriver.FindElement(MarksheetConstants.MarksheetDescription).SendKeys(description); IWebElement MarksheetName = ElementRetriever.GetOnceLoaded(MarksheetConstants.MarksheetName); MarksheetName.WaitUntilState(ElementState.Displayed); MarksheetName.SendKeys(name); IWebElement MarksheetDescription = ElementRetriever.GetOnceLoaded(MarksheetConstants.MarksheetDescription); MarksheetDescription.WaitUntilState(ElementState.Displayed); MarksheetDescription.SendKeys(description); }
/// <summary> /// Au: Logigear /// Des: Enter a string into TextBox, TextArea... controls /// </summary> /// <param name="element"></param> /// <param name="value"></param> public static void EnterForDropDown(this IWebElement element, string value) { try { element.SendKeys(Keys.Enter); WaitForAjaxReady(By.CssSelector(".locking-mask")); //IWebElement inputElement = FindElement(SimsBy.CssSelector("#select2-drop input.select2-input")); var inputElement = ElementRetriever.GetOnceLoaded(SeSugar.Automation.SimsBy.CssSelector("#select2-drop input.select2-input")); inputElement.WaitUntilState(ElementState.Displayed); inputElement.SendKeys(value); Thread.Sleep(2000); inputElement.SendKeys(Keys.Enter); } catch (Exception ex) { Console.WriteLine("Have an exception happens when enter date for drop down: " + ex.ToString()); } }
public void GetViews_All_Retrieved_Views_Are_Returned() { var viewList = new List <RvtView> { JustMock.Create <RvtView>(), JustMock.Create <RvtView>(), JustMock.Create <RvtView>() }; _mockElementCollector.Setup(coll => coll.GetViews(It.IsAny <Document>())).Returns(viewList); _mockClassMapper.Setup(map => map.Map <View>(It.IsAny <RvtView>())).Returns(Mock.Of <View>()); var elementRetriever = new ElementRetriever(_mockElementCollector.Object, _mockClassMapper.Object); ICollection <View> views = elementRetriever.GetViews(JustMock.Create <Document>()); Assert.NotNull(views); Assert.Equal(viewList.Count, views.Count); }
public void GetSheets_All_Retrieved_Sheets_Are_Returned() { var sheetList = new List <ViewSheet> { JustMock.Create <ViewSheet>(), JustMock.Create <ViewSheet>(), JustMock.Create <ViewSheet>() }; _mockElementCollector.Setup(coll => coll.GetSheets(It.IsAny <Document>())).Returns(sheetList); _mockClassMapper.Setup(map => map.Map <Sheet>(It.IsAny <ViewSheet>())).Returns(Mock.Of <Sheet>()); var elementRetriever = new ElementRetriever(_mockElementCollector.Object, _mockClassMapper.Object); ICollection <Sheet> sheets = elementRetriever.GetSheets(JustMock.Create <Document>()); Assert.NotNull(sheets); Assert.Equal(sheetList.Count, sheets.Count); }
private void NavigateToBulkUpdateApplicantParentalSalutationDetailScreen() { var bulkUpdateNavigation = new AdmissionsBulkUpdateNavigation(); bulkUpdateNavigation.NavgateToPupilBulkUpdate_SubMenu(AdmissionsBulkUpdateElements.BulkUpdate.MenuItems.ApplicantSalutationAddresseeMenuItem, LoginAs); Wait.WaitForAjaxReady(By.CssSelector(".locking-mask")); SeleniumHelper.ToggleCheckbox(AdmissionsBulkUpdateElements.BulkUpdate.Search.MissingSalutationCheckboxName); SeleniumHelper.ToggleCheckbox(AdmissionsBulkUpdateElements.BulkUpdate.Search.MissingAddresseeCheckboxName); SeleniumHelper.ChooseSelectorOption(ParentalSalutationAndAddresseeDetail.YearGroupDropDownList, _admissionYear); SeleniumHelper.ChooseSelectorOption(ParentalSalutationAndAddresseeDetail.SchoolIntakeDropDownList, _schoolIntakeName); SeleniumHelper.ChooseSelectorOption(ParentalSalutationAndAddresseeDetail.AdmissionGroupDropDownList, _admissionGroupName); ElementRetriever.FindElementSafe(WebContext.WebDriver, AdmissionsBulkUpdateElements.BulkUpdate.Search.SearchButton).SendKeys(Keys.Enter); Wait.WaitForAjaxReady(By.CssSelector(".locking-mask")); }
public static bool TestAddressBookLinkPresenceForTGScreen() { NavigateToOtherScreen.GoToTGScreen(); return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch))); }
public static bool TestAddressBookLinkPresenceForPupilScreenViaQuickAccess() { NavigateToOtherScreen.GoToPupilRecordScreen(); return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch))); }
public static bool TestAddressBookLinkPresenceForPupilScreen(bool senFlag = false) { NavigateToOtherScreen.PupilScreenOnTaskMenu(senFlag); return(ElementRetriever.IsExist(SeleniumHelper.Get(AddressBookElements.TextSearch))); }