Пример #1
0
        public void SetupDriver()
        {
            driver           = DriverManager.GetDriver();
            wait             = WaitManager.GetDefaultWait(driver);
            extentTest       = extentReports.CreateTest(ScenarioContext.Current.ScenarioInfo.Title);
            homePage         = new HomePage(driver, wait);
            bookDetailsPage  = new BookDetailsPage(driver, wait);
            foundResultsPage = new FoundResultsPage(driver, wait);
            basketPage       = new BasketPage(driver, wait);

            ScenarioContext.Current.Set <IWebDriver>(driver);
            ScenarioContext.Current.Set <IWait <IWebDriver> >(wait);
            ScenarioContext.Current.Set <HomePage>(homePage);
            ScenarioContext.Current.Set <FoundResultsPage>(foundResultsPage);
            ScenarioContext.Current.Set <BookDetailsPage>(bookDetailsPage);
            ScenarioContext.Current.Set <BasketPage>(basketPage);
            ScenarioContext.Current.Set <ExtentTest>(extentTest);
        }