Exemplo n.º 1
0
        public void TC_VerifyDevicesSubMenu()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            List <string[]> isEnabled = cmn.GetConfig("FitnessDevice", "NutritionApp");

            deviceEnabled    = isEnabled.ElementAt(0)[1].ToLower();
            nutritionEnabled = isEnabled.ElementAt(0)[2].ToLower();
            if (deviceEnabled.Equals("false") && nutritionEnabled.Equals("false"))
            {
                Assert.Ignore("Device and Apps not available for client");
            }
            if (GlobalVariables.isregistered.ToLower().Equals("false"))
            {
                Page_DevicesAndApps pdevice = new Page_DevicesAndApps();
                pdevice.AcceptTOS();
            }
            if (clientname.Equals("dollar general"))
            {
                Assert.Ignore("Feature no availabe for the client");
            }
            else
            {
                cmn.ClickDevicesAndApps();

                int             optionno = 47;
                Page_Dashboard  dashbrd  = new Page_Dashboard(softassertions);
                List <String[]> popupmsg = null;

                if (clientname.Equals("health trust"))
                {
                    popupmsg = CSVReaderDataTable.GetCSVData("LeftmenuContent", "Dashboard", "devicesandapppssubmenu", clientname);
                }
                else
                {
                    popupmsg = CSVReaderDataTable.GetCSVData("LeftmenuContent", "Dashboard", "devicesandapppssubmenu", "Common");
                }

                dashbrd.Verify_LeftSubMenuOptions(popupmsg, optionno);
            }
        }
Exemplo n.º 2
0
        public void TC_VerifyLeftMenuOptions()
        {
            //Page_Login plogin = new Page_Login();
            //plogin.Login();

            //Page_HAPrompt haprompt = new Page_HAPrompt();
            //haprompt.GoToDashboard();

            if (GlobalVariables.isregistered.ToLower().Equals("false"))
            {
                Page_DevicesAndApps pdevice = new Page_DevicesAndApps();
                pdevice.AcceptTOS();
            }
            Common cmn = new Common();

            cmn.OpenHamMenu();

            Page_Dashboard dashbrd = new Page_Dashboard(softassertions);

            //menuitems = CSVReaderDataTable.GetCSVData("LeftmenuContent", pageName, "menuitems", GlobalVariables.clientname);
            // if ((GlobalVariables.clientname.ToLower().Equals("health trust")) || (GlobalVariables.clientname.ToLower().Equals("meabt")))
            //if ((GlobalVariables.clientname.ToLower().Equals("health trust")))
            //     {
            //    dashbrd.Verify_LeftMenuOptionsOrder(menuitems);
            //    }
            //else
            //{

            menuitems = CSVReaderDataTable.GetCSVData("LeftmenuContent", pageName, "menuitems", "Common");
            //Console.WriteLine("in else section");
            dashbrd.Verify_LeftMenuCommonOptions(menuitems);
            menuitems = CSVReaderDataTable.GetCSVData("LeftmenuContent", pageName, "menuitems", GlobalVariables.clientname.ToLower());
            dashbrd.Verify_LeftMenuCommonOptions(menuitems);

            //}
            cmn.CloseHamMenu();

            is_soft_assert = true;
            softassertions.AssertAll();
        }