Ejemplo n.º 1
0
 private void ClickImprovingNutritionCourse()
 {
     System.Threading.Thread.Sleep(2000);
     SeleniumKeywords.Click(pageName, "improvingnutritioncourse");
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Clicks on Nutrition Tracker menu item in hamburger menu
 /// </summary>
 public void NavigateToNutritionTracker()
 {
     SeleniumKeywords.Click(pageName, "nutracker");
 }
 /// <summary>
 /// Clicks on Cholesterol Tracker menu item in hamburger menu
 /// </summary>
 public void NavigateToOralHealthTracker()
 {
     SeleniumKeywords.Click(pageName, "oralhlthtracker");
 }
 private void ClickOnHealthContentTab()
 {
     SeleniumKeywords.Click(pageName, "healthcontent_tab");
 }
Ejemplo n.º 5
0
 private void ClickBPProgressCheckin()
 {
     SeleniumKeywords.Click(pageName, "bpprogresscheckinlbl");
 }
 /// <summary>
 /// This method clears the email id text field
 /// </summary>
 private void ClearEmailId()
 {
     SeleniumKeywords.PressKey(pageName, "emailtb", "DeleteAllText");
 }
 /// <summary>
 /// This method clears the Primary phone number text field
 /// </summary>
 private void ClearPrimaryPhoneNumber()
 {
     SeleniumKeywords.PressKey(pageName, "primphnotb", "DeleteAllText");
 }
 /// <summary>
 /// This method clears the Secondary Phone number text field
 /// </summary>
 private void ClearSecondaryPhoneNumber()
 {
     SeleniumKeywords.PressKey(pageName, "secphnotb", "DeleteAllText");
 }
 /// <summary>
 /// This method clicks on the Save Btn
 /// Save Btn appears once edit btn is clicked in my information part in settings
 /// </summary>
 private void ClickSaveBtn()
 {
     SeleniumKeywords.Click(pageName, "savebtn");
     System.Threading.Thread.Sleep(2000);
 }
 /// <summary>
 /// This method is used to click view History Btn
 /// </summary>
 public void ClickViewHistory()
 {
     Thread.Sleep(5000);
     SeleniumKeywords.Click(pageName, "historybtn");
 }
 private void ClickMaintainWeightGoal()
 {
     SeleniumKeywords.Click(pageName, "maintainweighttxt");
 }
        /// <summary>
        /// This method is used to validate existance of chart
        /// </summary>
        /// <returns></returns>
        private void ValidateChartExistence()
        {
            bool chartvisible = SeleniumKeywords.IsElementPresent(pageName, "chartcontainer");

            softAssertions.Add("Tracker Chart", true, chartvisible, "equals");
        }
 private Boolean NotRecommendedCoachingAfterHA(String Coachingname)
 {
     return(SeleniumKeywords.IsElementNotPresent(pageName, "coaching_recommended", Coachingname));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Clicks on Cholesterol Tracker menu item in hamburger menu
 /// </summary>
 private void NavigateToPATracker()
 {
     SeleniumKeywords.Click(pageName, "patracker");
 }
 /// <summary>
 /// This is used to click My profile edit btn
 /// </summary>
 private void ClickMyProfEditBtn()
 {
     //System.Threading.Thread.Sleep(2000);
     SeleniumKeywords.Click(pageName, "myproeditbtn");
 }
 /// <summary>
 /// This method sets the value in Online Display Name field in My Profile Section
 /// </summary>
 private void InputOnlineDisplayName()
 {
     SeleniumKeywords.SetText(pageName, "oldispnametb", "Automation");
 }
 /// <summary>
 /// This method clears the text from Online Display Name text box
 /// </summary>
 private void ClearOnlineDisplayName()
 {
     SeleniumKeywords.PressKey(pageName, "oldispnametb", "DeleteAllText");
 }
 /// <summary>
 /// This method sets the value in Email id field
 /// </summary>
 private void InputEmailId()
 {
     SeleniumKeywords.SetText(pageName, "emailtb", "*****@*****.**");
 }
 /// <summary>
 /// This method clears the text from First Name text Box
 /// </summary>
 private void ClearFirstNameTxtBox()
 {
     SeleniumKeywords.PressKey(pageName, "firstnametb", "DeleteAllText");
 }
 /// <summary>
 /// This will set the First Name
 /// </summary>
 private void InputFirstName()
 {
     SeleniumKeywords.SetText(pageName, "firstnametb", "Autobots");
 }
 /// <summary>
 /// This method click on Health content option in left menu
 /// </summary>
 public void ClickOnHealthContentInMenu()
 {
     SeleniumKeywords.Click(pageName, "leftmenu_resources_healthcontent_lnk");
 }
 /// <summary>
 /// This will set the Primary Phone no
 /// </summary>
 private void InputPrimaryPh()
 {
     SeleniumKeywords.SetText(pageName, "primphnotb", "9999999999");
 }
 private string GetHealthContentTabAriaExpandedValue()
 {
     return(SeleniumKeywords.GetAttributeValue(pageName, "healthcontent_tab", "aria-expanded"));
 }
 /// <summary>
 /// This will set the Secondary Phone no
 /// </summary>
 private void InputSecondaryPh()
 {
     SeleniumKeywords.SetText(pageName, "secphnotb", "9999999999");
 }
 private void ClickGetActiveProgressCheckin()
 {
     SeleniumKeywords.Click(pageName, "getactiveprogresscheckinlbl");
 }
 /// <summary>
 /// This is used to click on the edit btn
 /// Edit button is present in the my information section in settings
 /// </summary>
 private void ClickMyInfoEditBtn()
 {
     //System.Threading.Thread.Sleep(2000);
     SeleniumKeywords.Click(pageName, "myinfoeditbtn");  //Click the Edit Btn using selenium keyword class
 }
 private void ClickQuitTobaccoProgressCheckin()
 {
     SeleniumKeywords.Click(pageName, "quittobaccoprogresscheckinlbl");
 }
 /// <summary>
 /// This method select the spanish language from language drop down from settings
 /// </summary>
 private void SelectEnglishLanguageFromDD()
 {
     //System.Threading.Thread.Sleep(2000);
     SeleniumKeywords.SelectValueFromDropdown(pageName, "language", "English");
 }
        }/// <summary>

        /// set user name on forgot password screen
        /// </summary>
        /// <param name="username"></param>
        private void SetpUsername(string username)
        {
            SeleniumKeywords.SetText(pageName, "forgotpass_username", username);
        }
Ejemplo n.º 30
0
        /// <summary>
        /// 1. Enters Data in the specified locators
        /// 2. Verifies History Header
        /// 3. Verifies first 3 values of Tracker in history
        /// </summary>
        /// <returns></returns>
        private void InputAndUpdateTrackerData()
        {
            List <string[]> result      = new List <string[]>();
            List <string[]> trackerdata = CSVReaderDataTable.GetCSVData("InputDataContent", pageName, "stressdata");
            List <string[]> historydata = CSVReaderDataTable.GetCSVData("CommonContent", pageName, "trackerhistoryheader");
            Common          date        = new Common(softAssertions);
            CommonTracker   stress      = new CommonTracker(softAssertions);

            //date.VerifyTimeAndDate();

            int changevalueindex = 0;


            for (int i = 0; i < 3; i++)
            {
                SeleniumKeywords.RefreshPage();
                int widthmultiple = 1;
                switch (trackerdata.ElementAt(i)[4])
                {
                case "Barely any or none":
                    widthmultiple = 0;
                    break;

                case "A little bit":
                    widthmultiple = 1;
                    break;

                case "Some":
                    widthmultiple = 2;
                    break;

                case "Quite a bit":
                    widthmultiple = 3;
                    break;

                case "A lot":
                    widthmultiple = 4;
                    break;
                }
                System.Threading.Thread.Sleep(10000);
                SeleniumKeywords.MoveAndClickAtSpecificPosition(pageName, trackerdata.ElementAt(i)[3], 4, widthmultiple, 1, 1);
                System.Threading.Thread.Sleep(3000);
                string inputdatetime = date.GetTrackerDateTime()[i];
                Console.WriteLine("InputDateTime : " + inputdatetime);
                JavaScriptKeywords.SetTextByControlId("DataPointDate", inputdatetime);
                stress.ClickUpdateButton();
                //System.Threading.Thread.Sleep(3000);
                stress.ClickViewHistory();
                if (i == 0)
                {
                    stress.ValidateHistoryHeader(historydata, pageName);
                    historydata = CSVReaderDataTable.GetCSVData("CommonContent", pageName, "trackerhistoryvalue");
                }

                String historytabledata = Convert.ToDateTime(inputdatetime).ToString("dddd, MMM dd yyyy hh:mm tt") + "|" + trackerdata.ElementAt(i)[4];

                //historydata.ElementAt(changevalueindex)[4] = Convert.ToDateTime(date.GetDate()[i]).ToString("dddd, MMM dd yyyy HH:mm tt");
                historydata.ElementAt(0)[4] = historytabledata;
                stress.ValidateHistoryData(historydata, pageName);
            }
        }