/// <summary>
        /// Fills the required fields on the AMA Group Learning Page
        /// </summary>
        ///
        public void FillOutAMAActivityForm2()
        {
            //generate the data to fill out the data
            DateTime dt            = DateTime.Now;
            int      currentDay    = dt.Day;
            int      currentMonth  = dt.Month;
            int      currentYear   = dt.Year;
            int      currentHour   = dt.Hour;
            int      currentMinute = dt.Minute;
            int      currentSecond = dt.Second;

            //create a string for the program title
            String ProgramTitle = "TestRun_" + currentMonth + "_" + currentDay + "_" + currentYear + "-" + currentHour + ":" + currentMinute + ":" + currentSecond;


            //These lines fill out the
            //text fields in the AMA Group Learning Activity Form

            ProgramTitleAMAGLTxt.SendKeys(ProgramTitle);
            ProvinceSelectorAMAGLDrpDn.SelectByIndex(1);
            ProvinceSelectorAMAGLDrpDn.SelectByText("Alberta (AB)");
            CityAMAGLTxt.SendKeys("Test City");
            PlanningOrganizationAMAGLTxt.SendKeys("Test");
            string date = DateTime.Today.AddDays(-1).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture);  //generate a date value for the activity forms

            ElemSet.ScrollToElement(Browser, ActivityStartDateAMAGLTxt);
            ActivityStartDateAMAGLTxt.SendKeys(date);
            ActivityCompletionDateAMAGLTxt.SendKeys(date);
            CreditsClaimedAMAGLTxt.SendKeys("1");

            //Select out the group radio buttons
            ElemSet.ClickAfterScroll(Browser, ChangedImprovedAMAGLRdo);
            ElemSet.ClickAfterScroll(Browser, LearnedNewAMAGLRdo);
            ElemSet.ClickAfterScroll(Browser, LearnedMoreAMAGLRdo);
            ElemSet.ClickAfterScroll(Browser, DissatisfiedAMAGLRdo);
            ElemSet.ClickAfterScroll(Browser, BiasedAMAGLRdo);
            ElemSet.ClickAfterScroll(Browser, ConfirmedAMAGLRdo);



            // MIKE: I would name these elements with a little more detail. It took me, a new person, a little bit of time to figure out what radio button was for each variable
            // MIKE: Always start with the beginning text when naming elements. For example for this radio button, name it "ThisExperienceConfirmedRdo" instead of just "Confirmed"

            // For some reason, whenever we use Selenium's built in click method here, it triggers the application to add more than
            // 1 credit for the activity/user (We entered "1" into the CreditsClaimed text box above, so only 1 credit should get
            // added for the user). I added a workaround to use the javascript version of a click, and this
            // works (only adds the specified amount of credits) For more info,
            // see https://stackoverflow.com/questions/24571048/selenium-webelement-click-vs-javascript-click-event
            JavascriptUtils.Click(Browser, SubmitButton);
            SubmitButton.SendKeys(Keys.Tab);
        }
        /// <summary>
        /// Fills the required fields on the AMA Self Learning Page
        /// </summary>
        ///
        public void FillOutAMAActivityForm1(int creditValue)
        {
            //generate the data to fill out the data
            DateTime dt            = DateTime.Now;
            int      currentDay    = dt.Day;
            int      currentMonth  = dt.Month;
            int      currentYear   = dt.Year;
            int      currentHour   = dt.Hour;
            int      currentMinute = dt.Minute;
            int      currentSecond = dt.Second;

            //create a string for the program title
            String ProgramTitle = "TestRun_" + currentMonth + "_" + currentDay + "_" + currentYear + "-" + currentHour + ":" + currentMinute + ":" + currentSecond;


            //These lines fill out the
            //text fields in the AMA Self Learning Activity Form

            ProgramTitleAMASLTxt.SendKeys(ProgramTitle);
            ProvinceSelectorAMASLDrpDn.SelectByIndex(1);
            ProvinceSelectorAMASLDrpDn.SelectByText("Alberta (AB)");
            CityAMASLTxt.SendKeys("Test City");
            PlanningOrganizationAMASLTxt.SendKeys("Test");
            string date = DateTime.Today.AddDays(-1).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture);  //Generate a date to use later in the form

            ElemSet.ScrollToElement(Browser, ActivityStartDateAMASLTxt);
            ActivityStartDateAMASLTxt.SendKeys(date);
            ActivityCompletionDateAMASLTxt.SendKeys(date);
            CreditsClaimedAMASLTxt.SendKeys("" + creditValue);



            //clicking on the radio buttons
            //at the end of the form
            ElemSet.ClickAfterScroll(Browser, ChangedImprovedAMASLRdo);
            ElemSet.ClickAfterScroll(Browser, LearnedNewAMASLRdo);
            ElemSet.ClickAfterScroll(Browser, LearnedMoreAMASLRdo);
            ElemSet.ClickAfterScroll(Browser, DissatisfiedAMASLRdo);
            ElemSet.ClickAfterScroll(Browser, BiasedAMASLRdo);
            ElemSet.ClickAfterScroll(Browser, ConfirmedAMASLRdo);

            // For some reason, whenever we use Selenium's built in click method here, it triggers the application to add more than
            // 1 credit for the activity/user (We entered "1" into the CreditsClaimed text box above, so only 1 credit should get
            // added for the user). I added a workaround to use the javascript version of a click, and this
            // works (only adds the specified amount of credits) For more info,
            // see https://stackoverflow.com/questions/24571048/selenium-webelement-click-vs-javascript-click-event
            JavascriptUtils.Click(Browser, SubmitButton);
            SubmitButton.SendKeys(Keys.Tab);

            Thread.Sleep(20000);     // MIKE: Definitely add wait criteria here. I see that a popup appears, we can wait on an element in this popup
        }
Example #3
0
        /// <summary>
        /// Clicks the user-specified element and then waits for a window to close or open, or a page to load,
        /// depending on the element that was clicked
        /// </summary>
        /// <param name="buttonOrLinkElem">The element to click on</param>
        public void ClickAndWait(IWebElement buttonOrLinkElem)
        {
            // Error handler to make sure that the button that the tester passed in the parameter is actually on the page
            if (Browser.Exists(Bys.PERTraineePage.BackToDashboardBtn))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == BackToDashboardBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntilAny(TimeSpan.FromSeconds(180), Criteria.PERTraineePage.MilestonesTblMilestoneNameLinksEnabled,
                                      Criteria.PERTraineePage.SubmitPortfolioBtnVisible, Criteria.PERTraineePage.ReviewStageValueLblHasText);
                    return;
                }
            }

            if (Browser.Exists(Bys.PERTraineePage.MilestonesInMilestonesTblLnks))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == MilestonesInMilestonesTblLnks[0].GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntilAll(Criteria.PERTraineePage.EvidenceTblUpdateLinksEnabledAndVisible,
                                      Criteria.PERTraineePage.BackToDashboardBtnVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.PERTraineePage.ResubmitBtn))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == ResubmitBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntilAll(Criteria.PERTraineePage.ReviewStageValueLblHasText);
                    return;
                }
            }

            if (Browser.Exists(Bys.PERTraineePage.EvidForAchieveFormCloseLnk))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == EvidForAchieveFormCloseLnk.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntil(Criteria.PERTraineePage.UploadedFileLnkVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.PERTraineePage.YourReplySaveChangesBtn))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == YourReplySaveChangesBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    // Add a better wait here. Note that waiting for the save changes button to not be visible doesnt work for some reason
                    Thread.Sleep(2000);
                    return;
                }
            }

            if (Browser.Exists(Bys.PERTraineePage.DescriptionSaveChangesBtn))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == DescriptionSaveChangesBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntilAll(Criteria.PERTraineePage.DescriptionSaveChangesButtonNotVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.PERTraineePage.MarkCompleteBtn))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == MarkCompleteBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntilAll(Criteria.PERTraineePage.MarkCompleteButtonNotVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.PERTraineePage.SubmitPortfolioFormSubmitBtn))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == SubmitPortfolioFormSubmitBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntilAll(Criteria.PERTraineePage.SubmitPortfolioFormSubmitBtnNotVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.PERTraineePage.SubmitPortfolioBtn))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == SubmitPortfolioBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntilAll(Criteria.PERTraineePage.SubmitPortfolioFormSubmitBtnVisible);
                    return;
                }
            }

            else
            {
                throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, " +
                                    "or if the button is already added, then the page you were on did not contain the button.");
            }
        }
Example #4
0
        /// <summary>
        /// Clicks the user-specified element and then waits for a window to close or open, or an element to be visible or enabled
        /// </summary>
        /// <param name="buttonOrLinkElem">The element to click on</param>
        public dynamic ClickAndWait(IWebElement buttonOrLinkElem)
        {
            if (Browser.Exists(Bys.ProgramPage.SelfReportActTab))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == SelfReportActTab.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntil(Criteria.ProgramPage.SelfReportActTabValidActivityTblBodyVisible);
                    return(null);
                }
            }

            if (Browser.Exists(Bys.ProgramPage.ProgramAdjustmentsTab))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == ProgramAdjustmentsTab.GetAttribute("outerHTML"))
                {
                    buttonOrLinkElem.Click();
                    this.WaitUntil(Criteria.ProgramPage.ProgramAdjustmentsActivityTblBodyRowVisible);
                    return(null);
                }
            }

            if (Browser.Exists(Bys.ProgramPage.DetailsTab))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == DetailsTab.GetAttribute("outerHTML"))
                {
                    buttonOrLinkElem.Click();
                    this.WaitUntil(Criteria.ProgramPage.DetailsTabStatusValueLblVisible);
                    return(null);
                }
            }

            if (Browser.Exists(Bys.ProgramPage.ProgAdjustTabAddAdjustLnk))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == ProgAdjustTabAddAdjustLnk.GetAttribute("outerHTML"))
                {
                    buttonOrLinkElem.Click();
                    this.WaitUntil(Criteria.ProgramPage.ProgAdjustTabAddAdjustFormAdjustCodeSelElemVisible);
                    return(null);
                }
            }

            if (Browser.Exists(Bys.ProgramPage.ProgAdjustTabAddAdjustFormAddAdjustBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == ProgAdjustTabAddAdjustFormAddAdjustBtn.GetAttribute("outerHTML"))
                {
                    buttonOrLinkElem.Click();
                    this.WaitUntilAll(TimeSpan.FromSeconds(120), Criteria.ProgramPage.ProgAdjustTabAddAdjustFormNotExists,
                                      Criteria.ProgramPage.AdjustmentAddedBannerNotExists);
                    // Adding a little sleep here. For some reason, whenever the code proceeds after clicking this button, the next line of code doesnt execute.
                    // For example, Navigate.GoToLoginPage. That code gets past the navigation part, but if you view the test in progress, no URL is entered into
                    // the URL. Another example I have code to click on the "Sites" tab in LTS after this, and the code goes past the Click line, but if you view
                    // the test, it didnt click anything. I have never seen this before. So far, I think it only happened in Debug mode.
                    // Monitor going forward
                    Thread.Sleep(0600);
                    return(null);
                }
            }

            if (Browser.Exists(Bys.ProgramPage.CreditValidationSubmitBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == CreditValidationSubmitBtn.GetAttribute("outerHTML"))
                {
                    buttonOrLinkElem.Click();
                    this.WaitUntil(Criteria.ProgramPage.SelfReportActTabValidActivityTblBodyVisible);
                    Thread.Sleep(0500);
                    return(null);
                }
            }

            else
            {
                throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, or if the button is already added, then the page you were on did not contain the button.");
            }

            return(null);
        }
Example #5
0
        /// <summary>
        /// Clicks the user-specified element and then waits for a window to close or open, or a page to load,
        /// depending on the element that was clicked
        /// </summary>
        /// <param name="buttonOrLinkElem">The button element</param>
        public void ClickAndWait(IWebElement buttonOrLinkElem)
        {
            // Error handler to make sure that the button that the tester passed in the parameter is actually on the page
            if (Browser.Exists(Bys.DiplomaTraineePage.BackToDashboardBtn))
            {
                // This is a workaround to be able to use an IF statement on an IWebElement type.
                if (buttonOrLinkElem.GetAttribute("outerHTML") == BackToDashboardBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntil(Criteria.DiplomaTraineePage.MainFrameVisibleAndEnabled);
                    Browser.SwitchTo().Frame(MainFrame);
                    this.WaitUntil(Criteria.DiplomaTraineePage.MilestonesTblVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.DiplomaTraineePage.SubmitMilestoneFormSubmitBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == SubmitMilestoneFormSubmitBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntil(Criteria.DiplomaTraineePage.MainFrameVisibleAndEnabled);
                    Browser.SwitchTo().Frame(MainFrame);
                    this.WaitUntil(Criteria.DiplomaTraineePage.MilestonesTblVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.DiplomaTraineePage.MilestonesInMilestonesTblLnks))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == MilestonesInMilestonesTblLnks[0].GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    WaitForMilestoneFrame();
                    return;
                }
            }

            if (Browser.Exists(Bys.DiplomaTraineePage.ResubmitBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == ResubmitBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntil(Criteria.DiplomaTraineePage.MainFrameVisibleAndEnabled);
                    Browser.SwitchTo().Frame(MainFrame);
                    this.WaitUntil(Criteria.DiplomaTraineePage.MilestonesTblVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.DiplomaTraineePage.EvidForAchieveFormDoneBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == EvidForAchieveFormDoneBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntil(Criteria.DiplomaTraineePage.UploadedFileLnkVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.DiplomaTraineePage.YourReplySaveChangesBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == YourReplySaveChangesBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    // Add a better wait here. Note that waiting for the save changes button to not be visible doesnt work for some reason
                    Thread.Sleep(2000);
                    return;
                }
            }

            if (Browser.Exists(Bys.DiplomaTraineePage.DescriptionSaveChangesBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == DescriptionSaveChangesBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntil(Criteria.DiplomaTraineePage.DescriptionSaveChangesButtonNotExists);
                    return;
                }
            }

            if (Browser.Exists(Bys.DiplomaTraineePage.SubmitBtn))
            {
                // Using offsetleft here instead of outerHTML because this button and SubmitPortfolioFormSubmitBtn have the same outerHTML
                if (buttonOrLinkElem.GetAttribute("offsetLeft") == SubmitBtn.GetAttribute("offsetLeft"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntil(Criteria.DiplomaTraineePage.SubmitMilestoneFormSelectReviewerSelElemIsVisibleHasItems);
                    return;
                }
            }

            if (Browser.Exists(Bys.DiplomaTraineePage.SubmitPortfolioFormSubmitBtn))
            {
                if (buttonOrLinkElem.GetAttribute("offsetLeft") == SubmitPortfolioFormSubmitBtn.GetAttribute("offsetLeft"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntil(Criteria.DiplomaTraineePage.SubmitPortfolioFormSubmitBtnNotVisible);
                    return;
                }
            }

            if (Browser.Exists(Bys.DiplomaTraineePage.SubmitPortfolioBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == SubmitPortfolioBtn.GetAttribute("outerHTML"))
                {
                    ElemSet.ClickAfterScroll(Browser, buttonOrLinkElem);
                    this.WaitUntilAll(Criteria.DiplomaTraineePage.SubmitPortfolioFormSubmitBtnVisible);
                    return;
                }
            }

            else
            {
                throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, " +
                                    "or if the button is already added, then the page you were on did not contain the button.");
            }
        }
        /// <summary>
        /// Fills out the Self page
        /// </summary>
        ///

        public void FillOutSelfLearningForm()
        {
            //generate the data to fill out the data

            DateTime dt            = DateTime.Now;
            int      currentDay    = dt.Day;
            int      currentMonth  = dt.Month;
            int      currentYear   = dt.Year;
            int      currentHour   = dt.Hour;
            int      currentMinute = dt.Minute;
            int      currentSecond = dt.Second;


            //create a string for the program title
            String ProgramTitle = "TestRun_" + currentMonth + "_" + currentDay + "_" + currentYear + "-" + currentHour + ":" + currentMinute + ":" + currentSecond;

            Thread.Sleep(3000);//add wait criteria later
            ElemSet.ScrollToElement(Browser, ProgramTitleCertifiedSelfLearningTxt);
            ProgramTitleCertifiedSelfLearningTxt.SendKeys(ProgramTitle);


            //move down to the province selection screen

            ElemSet.ScrollToElement(Browser, CityTxtCertifiedSelfLearningTxt);


            //select alberta
            ProvinceSelectorCertifiedSelfLearningDrpDn.SelectByIndex(1);
            //Fill out the test city
            CityTxtCertifiedSelfLearningTxt.SendKeys("Test City");
            //fill out the
            PlanningOrganizationCertifiedSelfLearningTxt.SendKeys("Test");

            //generate a date for these Activity Test
            DateTime dt2                = DateTime.Today.AddDays(-1);
            String   startDateText      = dt2.Month + "/" + dt2.Day + "/" + dt2.Year;
            String   completionDateText = dt2.Month + "/" + dt2.Day + "/" + dt2.Year;


            ActivityStartDateCertifiedSelfLearningTxt.SendKeys(startDateText);
            ActivityCompletionDateCertifiedSelfLearningTxt.SendKeys(completionDateText);

            CreditsClaimedDateCertifiedSelfLearningTxt.SendKeys("1");



            ElemSet.ClickAfterScroll(Browser, ChangedImprovedCertifiedGSelfLearningRdo);
            ElemSet.ClickAfterScroll(Browser, LearnedNewCertifiedSelfLearningRdo);
            ElemSet.ClickAfterScroll(Browser, LearnedMoreCertifiedSelfLearningRdo);
            ElemSet.ClickAfterScroll(Browser, ConfirmedCertifiedSelfLearningRdo);
            ElemSet.ClickAfterScroll(Browser, BiasedCertifiedSelfLearningRdo);
            ElemSet.ClickAfterScroll(Browser, DissatisfiedCertifiedSelfLearningRdo);


            ElemSet.ScrollToElement(Browser, SubmitButton);

            // For some reason, whenever we use Selenium's built in click method here, it triggers the application to add more than
            // 1 credit for the activity/user (We entered "1" into the CreditsClaimed text box above, so only 1 credit should get
            // added for the user). I added a workaround to use the javascript version of a click, and this
            // works (only adds the specified amount of credits) For more info,
            // see https://stackoverflow.com/questions/24571048/selenium-webelement-click-vs-javascript-click-event
            JavascriptUtils.Click(Browser, SubmitButton);
            SubmitButton.SendKeys(Keys.Tab);

            Thread.Sleep(20000);
        }
        /// <summary>
        /// Fills the required fields on the enter a CPD activity page
        /// </summary>
        ///
        public void FillOutAssessmentForm()
        {
            //generate the data to fill out the data
            DateTime dt            = DateTime.Now;
            int      currentDay    = dt.Day;
            int      currentMonth  = dt.Month;
            int      currentYear   = dt.Year;
            int      currentHour   = dt.Hour;
            int      currentMinute = dt.Minute;
            int      currentSecond = dt.Second;

            //create a string for the program title
            String ProgramTitle = "TestRun_" + currentMonth + "_" + currentDay + "_" + currentYear + "-" + currentHour + ":" + currentMinute + ":" + currentSecond;

            Thread.Sleep(2000);
            ProgramTitleCertifiedAssessmentTxt.SendKeys(ProgramTitle);

            //move down to the province selection screen
            IWebElement element = Browser.FindElement(By.Id("ctl00_ContentPlaceHolder1_CFPCActivitiesWizard_ctl03_fb1_ctl06_ctl17_CEComboBox3449685"));   // Put this element in the page bys class

            ElemSet.ScrollToElement(Browser, element);
            // MIKE: Removed a bunch of end lines
            //select alberta
            ProvinceSelectorDrpDn.SelectByIndex(1);
            ProvinceSelectorDrpDn.SelectByText("Alberta (AB)");       // MIKE: I added this line and commented the one above it. Why use index when you know which item you are going to choose? The index might change in the future if more items are added to the select list

            //Fill out the test city
            CityTxt.SendKeys("Test City");
            //fill out the
            PlanningOrganizationTxt.SendKeys("Test");

            //generate a date for these Activity Test
            string date = DateTime.Today.AddDays(-1).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture);  // MIKE: I added this line and commented out the below lines. Reduces lines and having seperate varaibles for the start and end doesnt make sense in this case

            //DateTime dt2 = DateTime.Today.AddDays(-1);
            //String startDateText = dt2.Month + "/"  + dt2.Day + "/" + dt2.Year;
            //String completionDateText = dt2.Month + "/" + dt2.Day + "/" + dt2.Year;

            //send the text to the box
            ActivityStartDateTxt.SendKeys(date);
            ActivityCompletionDateTxt.SendKeys(date);

            CreditsClaimedTxt.SendKeys("1");

            ChangedImprovedRdo.Click();
            LearnedNewRdo.Click();
            LearnMoreRdo.Click();

            //scroll to the dissatisfied radio button
            // ElemSet.ScrollToElement(Browser,DissatisfiedRdo);
            ElemSet.ClickAfterScroll(Browser, DissatisfiedRdo);    // MIKE: I added this line and commented the above one. We can talk at meeting

            BiasedRdo.Click();

            //scroll to element
            ElemSet.ClickAfterScroll(Browser, ConfirmedRdo);   // MIKE: I would name these elements with a little more detail. It took me, a new person, a little bit of time to figure out what radio button was for each variable
                                                               // MIKE: Always start with the beginning text when naming elements. For example for this radio button, name it "ThisExperienceConfirmedRdo" instead of just "Confirmed"

            // For some reason, whenever we use Selenium's built in click method here, it triggers the application to add more than
            // 1 credit for the activity/user (We entered "1" into the CreditsClaimed text box above, so only 1 credit should get
            // added for the user). I added a workaround to use the javascript version of a click, and this
            // works (only adds the specified amount of credits) For more info,
            // see https://stackoverflow.com/questions/24571048/selenium-webelement-click-vs-javascript-click-event
            JavascriptUtils.Click(Browser, SubmitButton);
            SubmitButton.SendKeys(Keys.Tab);


            Thread.Sleep(20000);     // MIKE: Definitely add wait criteria here. I see that a popup appears, we can wait on an element in this popup
        }