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(); } }
static void Main(string[] args) { IWebDriver _driver = new ChromeDriver(); DriverCover _driverCover = new DriverCover(_driver); TestFramework.CommonActions common = new TestFramework.CommonActions(_driver); common.SignIn_in_admin_panel(); _driverCover.NavigateToUrl("http://stgadmin.lottobaba.com/admin/packages"); PackagesPageObj package = new PackagesPageObj(_driver); package.EditPackage("SuperEnalotto (1-90)", 8); for (int i = 0; i < 71; ++i) { ChargePanelObj panel = new ChargePanelObj(_driver); ChargeFormObj form = panel.ChargeTheLastPayment(); form.MakeTransactionFailed(); form.UpdateTransaction(); } }