/// <summary> /// method to export the CBA file /// </summary> public void GenerateCbaExport() { //WaitElementToBeClickable(By.CssSelector(DataExchangeElements.CbaExport.SearchButtonToFind)); searchButton.Click(); searchButton.Click(); //wait until the result is loaded and has text WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(Timeout)); waiter.Until(ExpectedConditions.ElementToBeClickable(DataExchangeElements.CbaExport.Result)); WaitUntilEnabled(DataExchangeElements.CbaExport.Result); SeleniumHelper.WaitForElementClickableThenClick(DataExchangeElements.CbaExport.Result); waiter.Until(ExpectedConditions.ElementIsVisible(DataExchangeElements.CbaExport.ResultCba)); if (SeleniumHelper.Get(DataExchangeElements.CbaExport.ResultCba).Text != "No Matches") { //if (SeleniumHelper.Get(DataExchangeElements.CbaExport.CbaStatus).Text == "Pending with Errors") { WaitForAndClick(BrowserDefaults.TimeOut, DataExchangeElements.CbaExport.SelectCba); //wait till the generate button is clickable and then click it WaitUntilDisplayed(DataExchangeElements.CommonElements.PupilGridCheckBox); WaitElementToBeClickable(DataExchangeElements.CbaExport.GenerateButton); AutomationSugarHelpers.WaitForAndClickOn(DataExchangeElements.CbaExport.GenerateButton); //WaitForAndClick(BrowserDefaults.TimeOut, By.CssSelector(DataExchangeElements.CbaExport.GenerateButtonToFind)); } } else { _createButton.Click(); WaitForAndClick(BrowserDefaults.TimeOut, DataExchangeElements.CbaExport.AddPupilLink); WaitUntilDisplayed(DataExchangeElements.CbaExport.PrimaryClassToFind); WaitForAndClick(BrowserDefaults.TimeOut, DataExchangeElements.CbaExport.PrimaryClassToFind); WaitForAndClick(BrowserDefaults.TimeOut, DataExchangeElements.CbaExport.UploadCbaSearchButton); WaitUntilEnabled(DataExchangeElements.CbaExport.SearchRecordsToFindtext); SeleniumHelper.WaitForElementClickableThenClick(DataExchangeElements.CbaExport.SearchRecordsToFindtext); WaitForAndClick(BrowserDefaults.TimeOut, DataExchangeElements.CbaExport.AddSelectedButton); WaitForAndClick(BrowserDefaults.TimeOut, DataExchangeElements.CbaExport.OkButton); //wait till the generate button is clickable and then click it WaitUntilDisplayed(DataExchangeElements.CommonElements.PupilGridCheckBox); WaitElementToBeClickable(DataExchangeElements.CbaExport.GenerateButton); WaitElementToBeClickable(DataExchangeElements.CbaExport.GenerateButton); AutomationSugarHelpers.WaitForAndClickOn(DataExchangeElements.CbaExport.GenerateButton); } }
public void SelectRecordFromResults() { AutomationSugarHelpers.WaitForAndClickOn(DataExchangeElements.CtfExport.SearchRecordsToFindtext); }
public void ClickSearchButton() { WaitUntilEnabled(By.CssSelector(DataExchangeElements.CtfExport.SearchExportDestinationButton)); AutomationSugarHelpers.WaitForAndClickOn(By.CssSelector(DataExchangeElements.CtfExport.SearchExportDestinationButton)); }