public LanguageSteps() { driver = new ChromeDriver(); languagePage = new LanguagePage(driver); loginPage = new LoginPage(driver); profilePage = new ProfilePage(driver); }
// ############# Create a Constructor ############# public LanguageTabSteps() { // Inject the driver driver = new ChromeDriver(); languagePage = new LanguagePage(driver); loginPage = new LoginPage(driver); profilePage = new ProfilePage(driver); }
public void RunMainProcess() { LanguageDomainReport firstReport = new LanguageDomainReport(); LanguagePageReport secondReport = new LanguagePageReport(); string targetFile; DateTime endPeriod = StartPeriod.AddDays(this.DaysNumber * Config.OperatorBackDays); DateTime startPeriod = StartPeriod; string directoryPath = FileData.GetDataPath(startPeriod); PageViewsRawData pageViewData = new PageViewsRawData(GZip, FileData, this.DaysNumber); pageViewData.DownloadAllPeriodsData(startPeriod, endPeriod, directoryPath); pageViewData.DecompressData(directoryPath); CollectionsData processData = new CollectionsData(domainData); startPeriod = StartPeriod; //Process each file (period) and get the ressults do { FileData.SetConfigurationByPeriod(startPeriod, directoryPath); targetFile = FileData.GetTargetFileNoExt(); //for free memory related to last analysis using (FileReader fr = new FileReader(targetFile)) { Console.WriteLine(string.Concat("Processing data in file ", targetFile, "...")); //container of data to analyze PageViewCollection periodCollection = fr.GetDataToCollection(); //First report Console.WriteLine("\tProcessing language and domain data for period " + startPeriod.ToShortDateString()); LanguageDomain languageDomain = processData.GetLanguageAndDomainCount(periodCollection); languageDomain.Period = startPeriod; firstReport.AddLanguageDomain(languageDomain); //Second report LanguagePage languagePage = processData.GetLanguagePageCount(periodCollection); Console.WriteLine("\tProcessing language page data for period " + startPeriod.ToShortDateString()); languagePage.Period = startPeriod; secondReport.AddLanguagePage(languagePage); } startPeriod = startPeriod.AddDays(Config.OperatorBackDays); }while (startPeriod.CompareTo(endPeriod) != 0); //Report the results Console.Clear(); ConsoleReport.DisplayLanguageDomainCount(firstReport); ConsoleReport.DisplayLanguagePageMaxCount(secondReport); }
public void createLanguageTest() { // Profile Objects ProfilePage profileObj = new ProfilePage(driver); profileObj.navigateToLanguage(driver); // language Page Object LanguagePage languageObj = new LanguagePage(driver); languageObj.createLanguage(driver); }
public void deleteLanguageTest() { //delete language ProfilePage profileObj = new ProfilePage(driver); profileObj.navigateToLanguage(driver); // language Page Object LanguagePage languageObj = new LanguagePage(driver); languageObj.deleteLanguage(driver); }
public void deleteLanguageTest(IWebDriver driver) { // Profile Objects ProfilePage profileObj = new ProfilePage(driver); //profileObj.navigateToEducation(driver); profileObj.navigateToLanguage(driver); // language Page Object LanguagePage languageObj = new LanguagePage(driver); languageObj.deleteLanguage(driver); }
public LanguagePage GetLanguagePageCount(PageViewCollection periodCollection) { LanguagePage report = new LanguagePage(); var entry = periodCollection.Data.Where(e => e.ViewCount > 0) .GroupBy(x => x.PageTitle) .Select(y => new PageViewEntry { PageTitle = y.Key, ViewCount = Convert.ToUInt32(y.Sum(s => s.ViewCount)), }) .OrderByDescending(x => x.ViewCount) .FirstOrDefault(); report.Page = entry.PageTitle; //page tittle report.ViewCount = entry.ViewCount; return(report); }
public void AddLanguage() { //Populate the excel data GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile"); test = extent.CreateTest("Add Language Skill"); test.Log(Status.Info, "Starting the Add Language Test"); LanguagePage AddLanguage = new LanguagePage(); AddLanguage.Addlanguage(GlobalDefinitions.ExcelLib.ReadData(2, "Language"), GlobalDefinitions.ExcelLib.ReadData(2, "Level")); bool actual = AddLanguage.VerifyLanguage(GlobalDefinitions.ExcelLib.ReadData(2, "Language")); if (actual) { test.Log(Status.Pass, "Add Language Successfull"); Assert.IsTrue(actual); } else { test.Log(Status.Fail, "Add Language Failed"); Assert.IsTrue(actual); } }
public void WhenIAddNewLanguageOnTheProfileDetail() { var addlan = new LanguagePage(); addlan.AddLanguage(); }
public void WhenIPressADDNEWButtonAndThenIEnterAddLanguageAndLevelAndPressAdd() { LanguagePage create = new LanguagePage(); create.addlanguage(); }
public void WhenIDeleteExistingLanguage() { var deletelan = new LanguagePage(); deletelan.DeleteLanguage(); }
public void ThenIShouldAbleToAddNewLanguageSuccessfully() { var lanaddSucessfully = new LanguagePage(); lanaddSucessfully.LanAdded(); }
public void ThenIShouldNotBeAbleToSeeTheDELETEDLANGUAGEAndShouldReceiveAPopUpMessage() { LanguagePage create = new LanguagePage(); create.ValidateDelLanguage(); }
public void InitPages() { loginPage = new LoginPage(Driver); homePage = new HomePage(Driver); languagePage = new LanguagePage(Driver); }
public void ThenIShouldAbleToValidateNewUPDATEDLANGUAGERecordSuccessfully() { LanguagePage create = new LanguagePage(); create.Validate_Update_language(); }
public void WhenIPressCROSSDeleteSign() { LanguagePage create = new LanguagePage(); create.DeleteLanguage(); }
public void ThenIAmAbleToDeleteExistingLanguageSuccessfully() { var landeleted = new LanguagePage(); landeleted.LanDeleted(); }
public void GivenEnterTheLanguages() { LanguagePage p = new LanguagePage(); p.Languages(driver); }
public void WhenIClickOnUpdateExistingLanguage() { var updatelan = new LanguagePage(); updatelan.UpdateLan(); }
public void GivenIClickOnLANGUAGEDataTab() { LanguagePage create = new LanguagePage(); create.languagetab(); }
public void ThenIAmAbleToUpdateExistingLanguage() { var lanupdate = new LanguagePage(); lanupdate.LanUpdated(); }
public static Uco.Models.Settings GetCurrentSettings() { if (LS.CurrentEntityContext == null) { return new Settings() { AdminEmail = "*****@*****.**", Domain = "localhost", LanguageCode = "en-US", Roles = "", } } ; if (SF.UseMultiDomain() == false) { string Token = "CurrentSettings_" + SF.GetLangCodeThreading(); if (LS.Cache[Token] == null) { lock (s_lock) { Settings s = GetSettingsRepositoryList().FirstOrDefault(); if (s == null) { return(null); } string LangCodeThreading = SF.GetLangCodeThreading(); if (SF.GetLangCodeWebconfig() != LangCodeThreading) { LanguagePage l = _db.LanguagePages.FirstOrDefault(r => r.DomainID == s.ID && r.LanguageCode == LangCodeThreading); if (l != null) { s.LanguageCode = l.LanguageCode; //s.LanguageRTL = l.ShowOnMainPage; s.HeaderHtml = l.Text2; s.FotterHtml = l.Text3; } } LS.Cache[Token] = s; } } return((Uco.Models.Settings)LS.Cache[Token]); } else { string Domain = SF.GetCurrentDomain(); if (LS.CurrentHttpContext.Request.IsLocal) { string TokenAdmin = "AdminCurrentSettingsRepository"; if (LS.CurrentHttpContext.Session[TokenAdmin] != null) { return((Uco.Models.Settings)LS.CurrentHttpContext.Session[TokenAdmin]); } else { string Token = string.Format("CurrentSettingsMultiDomain_{0}_{1}", Domain, SF.GetLangCodeThreading()); if (LS.Cache[Token] == null) { lock (s_lock) { Settings s = GetSettingsRepositoryList().FirstOrDefault(); if (s == null) { return(null); } string LangCodeThreading = SF.GetLangCodeThreading(); if (SF.GetLangCodeWebconfig() != LangCodeThreading) { LanguagePage l = _db.LanguagePages.FirstOrDefault(r => r.DomainID == s.ID && r.LanguageCode == LangCodeThreading); if (l != null) { s.LanguageCode = l.LanguageCode; //s.LanguageRTL = l.ShowOnMainPage; s.HeaderHtml = l.Text2; s.FotterHtml = l.Text3; } } LS.Cache[Token] = s; } } return((Uco.Models.Settings)LS.Cache[Token]); } } else { string Token = string.Format("CurrentSettingsMultiDomain_{0}_{1}", Domain, SF.GetLangCodeThreading()); if (LS.Cache[Token] == null) { lock (s_lock) { Settings s = GetSettingsRepositoryList().FirstOrDefault(r => r.Domain == Domain); if (s == null) { return(null); } string LangCodeThreading = SF.GetLangCodeThreading(); if (SF.GetLangCodeWebconfig() != LangCodeThreading) { LanguagePage l = _db.LanguagePages.FirstOrDefault(r => r.DomainID == s.ID && r.LanguageCode == LangCodeThreading); if (l != null) { s.LanguageCode = l.LanguageCode; //s.LanguageRTL = l.ShowOnMainPage; s.HeaderHtml = l.Text2; s.FotterHtml = l.Text3; } } LS.Cache[Token] = s; } } return((Uco.Models.Settings)LS.Cache[Token]); } } }
public void ThenIShouldAbleToValidateAddedNEWLANGUAGERecordSuccessfully() { LanguagePage create = new LanguagePage(); create.ValidateAddLanguage(); }
public void ThenAddAndUpdateOrDeleteTheExistingLanguages() { LanguagePage le = new LanguagePage(); le.LangEdit(driver); }
public void WhenIPressUpdatePenAndUpdateTheLanguageAndLevelAndPressTheUPDTAEButton() { LanguagePage create = new LanguagePage(); create.UpdateLanguage(); }