Ejemplo n.º 1
0
 public void SetUpActor()
 {
     Actor     = new Actor(logger: new ListLogger());
     WebDriver = new Mock <ITestWebDriver>();
     WebDriver.SetupGet(x => x.WindowHandles).Returns(new List <string>().AsReadOnly());
     Actor.Can(BrowseTheWeb.With(WebDriver.Object));
     Actor.Can(SetTimeouts.To(0));
 }
Ejemplo n.º 2
0
        public void InitializeScreenplay()
        {
            actor = new Actor(name: "Harshit", logger: new ConsoleLogger());
            string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            actor.Can(BrowseTheWeb.With(new ChromeDriver(directoryName + "\\Drivers")));
            actor.AttemptsTo(Navigate.ToUrl(LoginPage.Url));
            actor.AttemptsTo(MaximizeWindow.ForBrowser());
        }
        public void RegisterDI()
        {
            _scenarioContext.ScenarioContainer.RegisterTypeAs <DatabaseContext, IDatabaseContext>();

            var actor = new Actor("Chrome", new ConsoleLogger());

            actor.Can(BrowseTheWeb.With(new ChromeDriver()));

            _scenarioContext.ScenarioContainer.RegisterInstanceAs(actor);
        }
Ejemplo n.º 4
0
 public void InitializeScreenplay()
 {
     Actor = new Actor(name: "Andy", logger: new ConsoleLogger());
     Actor.Can(BrowseTheWeb.With(new ChromeDriver()));
 }