Example #1
0
        public void RunBeforeAnyTests()
        {
            IWebDriver driver = new ChromeDriver();
            try
            {
                TestFramework.CommonActions actions = new TestFramework.CommonActions(driver);
                actions.SignIn_in_admin_panel();
                DriverCover driverCover = new DriverCover(driver);
                driverCover.NavigateToUrl(driverCover.BaseAdminUrl + "admin/sites/1/edit");

                SiteEditingPageObj siteEditing = new SiteEditingPageObj(driver);
                siteEditing.SwitchCombinedPageOff();
                siteEditing.SwitchOneTimeEntryOn();
                siteEditing.SwitchGroupGameOn();
                siteEditing.SwitchSingleGameOn();
                siteEditing.SwitchAddressOn();
                siteEditing.SwitchNewSignUpOff();
                siteEditing.SwitchNewPlayPageOff();
                siteEditing.SwitchAddToCartOn(true);

                driver.Dispose();
            }
            catch (Exception)
            {
               driver.Dispose();
            }
        }
Example #2
0
 /// <summary>
 /// Switches on the combined payment page for a site
 /// </summary>
 public void SwitchOnCombinedPaymentPage()
 {
     SignIn_in_admin_panel();
     _driverCover.NavigateToUrl(_driverCover.BaseAdminUrl + "admin/sites/1/edit");
     SiteEditingPageObj siteEditing = new SiteEditingPageObj(_driver);
     siteEditing.SwitchCombinedPageOn();
 }
Example #3
0
        /// <summary>
        /// Changes a default deposit value for a website. Needs previous log in the admin panel
        /// </summary>
        /// <param name="siteID"></param>
        /// <returns></returns>
        public string Change_Amount_Of_Default_Deposit(string siteID)
        {
            _driverCover.NavigateToUrl(_driverCover.BaseAdminUrl + "admin/sites/" + siteID + "/edit");

            SiteEditingPageObj siteEditing = new SiteEditingPageObj(_driver);

            int[] amounts = new[] { 15, 30, 60, 90, 120, 150 };
            int defaultValue = amounts[RandomGenerator.GenerateNumber(0, 6)];
            siteEditing.SelectDefaultDepositAmount(defaultValue.ToString());

            return defaultValue.ToString();
        }