public void WhenIEditTheActivityTypeAndChangeTheValuesOfThePreferencesSetsAndClickOnApplyToAll() { try { _generalPreferencesPage.SelectActivities(); _activitiesPreferencesPage.ClickFirstPreferencesEditLink(); GenericHelper.WaitUtilWindow("Default preferences"); GenericHelper.SelectWindow("Default preferences"); //set question count _defaultPreferencesPage.SetQuestionCount("2"); //set attempts // _defaultPreferencesPage.SetAttempts("4"); // select activity style sheet _defaultPreferencesPage.SelectMsl100StyleSheet(); //set time limit _defaultPreferencesPage.SelectTiming(); _defaultPreferencesPage.SelectActivityLevelRadioButton(); _defaultPreferencesPage.SetHours("2"); //set threshold score _defaultPreferencesPage.SelectGrading(); _defaultPreferencesPage.SetThresholdScore("60"); _defaultPreferencesPage.ClickApplyToAll(); _showMessagePage.ClickOk(); if (GenericHelper.IsPopUpClosed(2)) { GenericHelper.Logs("Default Preferences Page closed on clicking Apply to all and ok button in pegasus pop up", "PASSED"); } else { GenericHelper.Logs("Default Preferences Page not closed on clicking Apply to all and ok button in pegasus pop up", "FAILED"); throw new Exception("Default Preferences Page not closed on clicking Apply to all and ok button in pegasus pop up"); } GenericHelper.SelectDefaultWindow(); if (GenericHelper.VerifySuccesfullMessage( "Preference settings updated for all existing and future activities of the selected activity type")) { GenericHelper.Logs("On doing Apply To All of Default Preferences Sucessfull message displayed", "PASSED"); } else { GenericHelper.Logs("On doing Apply To All of Default Preferences Sucessfull message not displayed", "FAILED"); throw new Exception("On doing Apply To All of Default Preferences Sucessfull message not displayed"); } } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); Assert.Fail(e.ToString()); } }