private void startDriver()
 {
     theLifecycle = WebDriverSettings.GetBrowserLifecyle();
     theDriver = theLifecycle.Driver;
     theDriver.Navigate().GoToUrl("file:///" + "screenfixture.htm".ToFullPath());
     theFixture = new StubScreenFixture(theDriver);
 }
Exemplo n.º 2
0
        public IApplicationUnderTest Start(ApplicationSettings settings, FubuRuntime runtime, IBrowserLifecycle lifecycle)
        {
            var application = new ApplicationUnderTest(runtime, settings, lifecycle);
            application.Ping();

            return application;
        }
Exemplo n.º 3
0
 public ApplicationUnderTest(IApplicationSource source, ApplicationSettings settings, IBrowserLifecycle browser)
     : this(source.GetType().Name, settings.RootUrl, browser, () =>
     {
         var app = source.BuildApplication();
         return app.Bootstrap().Factory;
     })
 {
 }
Exemplo n.º 4
0
        public IApplicationUnderTest Start(ApplicationSettings settings, FubuRuntime runtime, IBrowserLifecycle lifecycle)
        {
            var port = PortFinder.FindPort(settings.Port);
            _server = new EmbeddedFubuMvcServer(runtime, settings.PhysicalPath, port);

            settings.RootUrl = _server.BaseAddress;
            return new ApplicationUnderTest(runtime, settings, lifecycle);
        }
Exemplo n.º 5
0
 public NavigationDriver(IBrowserLifecycle browserLifecycle, IUrlRegistry urls, IAfterNavigation afterNavigation,
                         FubuRuntime runtime)
 {
     _browserLifecycle = browserLifecycle;
     _urls             = urls;
     _afterNavigation  = afterNavigation;
     _runtime          = runtime;
 }
Exemplo n.º 6
0
        private ApplicationUnderTest(string name, string rootUrl, IBrowserLifecycle browser, Func <IServiceFactory> factorySource)
        {
            _name    = name;
            _rootUrl = rootUrl;
            _browser = browser;

            _container = new Lazy <IServiceFactory>(factorySource);

            _urls = new Lazy <IUrlRegistry>(() => _container.Value.Get <IUrlRegistry>());

            _navigation = new Lazy <NavigationDriver>(() => new NavigationDriver(this));

            _services = new Lazy <IServiceLocator>(() => _container.Value.Get <IServiceLocator>());
        }
Exemplo n.º 7
0
        private ApplicationUnderTest(string name, string rootUrl, IBrowserLifecycle browser,
            Func<IServiceFactory> factorySource)
        {
            _name = name;
            _rootUrl = rootUrl;
            _browser = browser;

            _container = new Lazy<IServiceFactory>(factorySource);

            _urls = new Lazy<IUrlRegistry>(() => _container.Value.Get<IUrlRegistry>());

            _navigation = new Lazy<NavigationDriver>(() => new NavigationDriver(this));

            _services = new Lazy<IServiceLocator>(() => _container.Value.Get<IServiceLocator>());
        }
Exemplo n.º 8
0
        private void buildApplication()
        {
            _application = new SerenityJasmineApplication();
            var fileSystem   = new FileSystem();
            var loader       = new JasmineConfigLoader(fileSystem);
            var configurator = new JasmineConfigurator(fileSystem, loader);

            _configuration = configurator.Configure(_input.SerenityFile, _application);


            var applicationSettings = new ApplicationSettings
            {
                RootUrl = "http://localhost:" + _input.PortFlag
            };

            IBrowserLifecycle browserBuilder = _input.GetBrowser();

            _applicationUnderTest = new ApplicationUnderTest(_application, applicationSettings, browserBuilder);

            _driver = new NavigationDriver(_applicationUnderTest);
        }
Exemplo n.º 9
0
 public ApplicationUnderTest(IApplicationSource source, ApplicationSettings settings, IBrowserLifecycle browser)
     : this(source.GetType().Name, settings.RootUrl, browser, () =>
 {
     var app = source.BuildApplication();
     return(app.Bootstrap().Factory);
 })
 {
 }
Exemplo n.º 10
0
 public ApplicationUnderTest(FubuRuntime runtime, ApplicationSettings settings, IBrowserLifecycle browser)
     : this(settings.Name, settings.RootUrl, browser, () => runtime.Factory)
 {
 }
Exemplo n.º 11
0
        public IApplicationUnderTest Start(ApplicationSettings settings, FubuRuntime runtime, IBrowserLifecycle lifecycle)
        {
            _server = new SelfHostHttpServer(settings.Port, settings.PhysicalPath);
            _server.Start(runtime);

            settings.RootUrl = _server.BaseAddress;

            return new ApplicationUnderTest(runtime, settings, lifecycle);
        }
Exemplo n.º 12
0
        public IApplicationUnderTest Start(ApplicationSettings settings, FubuRuntime runtime, IBrowserLifecycle lifecycle)
        {
            var port = PortFinder.FindPort(settings.Port);

            _server = new EmbeddedFubuMvcServer(runtime, settings.PhysicalPath, port);

            settings.RootUrl = _server.BaseAddress;
            return(new ApplicationUnderTest(runtime, settings, lifecycle));
        }
Exemplo n.º 13
0
        public IApplicationUnderTest Start(ApplicationSettings settings, FubuRuntime runtime, IBrowserLifecycle lifecycle)
        {
            var application = new ApplicationUnderTest(runtime, settings, lifecycle);

            application.Ping();

            return(application);
        }
Exemplo n.º 14
0
 public ApplicationUnderTest(FubuRuntime runtime, ApplicationSettings settings, IBrowserLifecycle browser)
     : this(settings.Name, settings.RootUrl, browser, () => runtime.Factory)
 {
 }
Exemplo n.º 15
0
 private void startDriver()
 {
     _lifecycle = WebDriverSettings.GetBrowserLifecyle();
     theDriver = _lifecycle.Driver;
     theDriver.Navigate().GoToUrl("file:///" + "checkbox.htm".ToFullPath());
 }