public void Setup()
 {
     TestLogger.LogTestCaseStart();
     WebDriverHelper.InitialiseDriver();
     WebDriverHelper.LaunchUrl(TestRun.SelectedEnvironment);
     WebDriverHelper.Maximise();
 }
        public void Setup()
        {
            TestLogger.LogTestCaseStart();
            WebDriverHelper.InitialiseDriver();
            WebDriverHelper.LaunchUrl(TestRun.SelectedEnvironment);
            if (TestRun.SelectedEnvironment.Equals("Test"))
            {
                WebDriverHelper.WaitUntilURLContains(TestRun.SelectedEnvironment);
            }
            else if (TestRun.SelectedEnvironment.Equals("Live"))
            {
                WebDriverHelper.WaitUntilURLContains("http://www.tvslogistics.com/RVW/extui/vwrt/securelaunchpanel");
                WebDriverHelper.SwitchWindow();
                WebDriverHelper.WaitUntilURLContains("http://www.tvslogistics.com/RVW/extui/vwrt/LaunchPanel");
            }

            WebDriverHelper.Maximise();
        }
        private void TestUserGroupCheck()
        {
            string userGroup;
            string category = (string)TestContext.CurrentContext.Test.Properties.Get("Category");

            if (category != null &&
                category.Equals("TestUserGroup"))
            {
                try
                {
                    WebDriverHelper.InitialiseDriver();
                    WebDriverHelper.LaunchUrl(TestRun.SelectedEnvironment);

                    RVWWebApp.Login.SignIntoAccountWIthTestUser();

                    userGroup = RVWWebApp.SelfServiceHome.UserGroup.GetElementText();

                    if (userGroup.Equals("Asrar") == false)
                    {
                        WaitSeconds(3);
                        RVWWebApp.SelfServiceHome.UserInfoClick.SelectDropDownOptionByText("Setup Defaults");
                        RVWWebApp.SelfServiceHome.UserGroupPopUp.OUInstanceDesc.InputText("", true);
                        RVWWebApp.SelfServiceHome.UserGroupPopUp.OUInstanceDesc.Click();

                        RVWWebApp.SelfServiceHome.UserGroupPopUp.SavedRecordPopUpClose.Click();
                        RVWWebApp.SelfServiceHome.UserGroupPopUp.ChangeDefaultPopUpClose.Click();
                    }
                }

                catch
                {
                    //Nothing To Do
                }

                finally
                {
                    WebDriverHelper.KillDriver();
                }
            }
        }