public void ScenarioTearDown()
        {
            string baseURL = Helps.GetConfigurationValue("EduSohoHomePageURL");

            driver.Navigate().GoToUrl(baseURL);
            context["webdriver"] = driver;
        }
        public void GivenIAmInPage(string pageName)
        {
            string baseURL = Helps.GetConfigurationValue(pageName);

            driver.Navigate().GoToUrl(baseURL);
            context["webdriver"] = driver;
        }
        public void GotoHomePage()
        {
            string baseURL = Helps.GetConfigurationValue("EduSohoHomePageURL");

            webDriver.Navigate().GoToUrl(baseURL);
            context["webdriver"] = webDriver;
        }
示例#4
0
        public void BeforeScenario(ScenarioContext scenarioContext)
        {
            Console.WriteLine("BeforeScenario");
            scenario = featureName.CreateNode <Scenario>(scenarioContext.ScenarioInfo.Title);
            string baseURL = Helps.GetConfigurationValue("EduSohoHomePageURL");

            driver.Navigate().GoToUrl(baseURL);
            scenarioContext["webdriver"] = driver;
        }
        public void GivenIAmInRegisterPage()
        {
            string baseURL = Helps.GetConfigurationValue("EduSohoRegisterPageURL");

            driver = new FirefoxDriver();
            driver.Navigate().GoToUrl(baseURL);
            context["webdriver"] = driver;
            registerPage         = new EduSohoRegisterPage(context);
        }
示例#6
0
 PersonalSettingsSteps(ScenarioContext scenarioContext)
 {
     context = scenarioContext;
     if (scenarioContext.ContainsKey("webdriver"))
     {
         driver = (IWebDriver)scenarioContext["webdriver"];
     }
     else
     {
         string baseURL = Helps.GetConfigurationValue("EduSohoHomePageURL");
         driver = new FirefoxDriver();
         driver.Navigate().GoToUrl(baseURL);
         context["webdriver"] = driver;
     }
 }
示例#7
0
        //       static ScenarioContext _scenarioContext;
        // static FeatureContext _featureContext;

        public Hooks()
        {
            //           _scenarioContext = scenarioContext;
//            _featureContext = featureContext;
            string browsertype = Helps.GetConfigurationValue("BrowserType");

            switch (browsertype)
            {
            case "Firefox":
                FirefoxOptions options = new FirefoxOptions();
                //                    options.AddArguments("--headless");
                driver = new FirefoxDriver(options);
                break;

            case "Chrome":
                driver = new ChromeDriver();
                break;
            }
        }