Exemplo n.º 1
0
        public void BeforeScenario()
        {
            scenario = featureName.CreateNode <Scenario>(ScenarioContext.Current.ScenarioInfo.Title);
            Dashboard.CreateTest(ScenarioContext.Current.ScenarioInfo.Title);
            var browser = NUnit.Framework.TestContext.Parameters["browser"] ?? "Chrome";

            Parameters.SaveParameter(Parameters.Test.TestName.ToString(), String.Format("{0} - {1}", FeatureContext.Current.FeatureInfo.Title, ScenarioContext.Current.ScenarioInfo.Title));
            ScreenDriver.Initialize(browser);
        }
Exemplo n.º 2
0
        public void GivenINavigateToGoogleHeadlinesPage(string p0)
        {
            string message = string.Empty;
            bool   success = false;

            try
            {
                ScreenDriver.Goto(p0);
                success = true;
            }
            catch (Exception e)
            {
                message = e.Message;
            }
            Parameters.SaveParameter("Expected", success ? message : message);
            Assert.IsTrue(success, message);
        }
Exemplo n.º 3
0
        public void ThenICloseTheBrowser()
        {
            string message = string.Empty;
            bool   success = false;

            try
            {
                ScreenDriver.CloseTab();
                ScreenDriver.QuitDriver();
                success = true;
            }
            catch (Exception e)
            {
                message = e.Message;
            }
            Parameters.SaveParameter("Expected", success ? message : "Error something went wrong");
            Assert.IsTrue(success, message);
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            ScreenDriver driver = new ScreenDriver();

            driver.Run();
        }
Exemplo n.º 5
0
 public void AfterScenario()
 {
     ScreenDriver.QuitDriver();
 }