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

            return application;
        }
 public ApplicationUnderTest(IApplicationSource source, ApplicationSettings settings, IBrowserLifecycle browser)
     : this(source.GetType().Name, settings.RootUrl, browser, () =>
     {
         var app = source.BuildApplication();
         return app.Bootstrap().Factory;
     })
 {
 }
        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);
        }
 public NavigationDriver(IBrowserLifecycle browserLifecycle, IUrlRegistry urls, IAfterNavigation afterNavigation,
                         FubuRuntime runtime)
 {
     _browserLifecycle = browserLifecycle;
     _urls             = urls;
     _afterNavigation  = afterNavigation;
     _runtime          = runtime;
 }
Exemple #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>());
        }
        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>());
        }
Exemple #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);
        }
 public ApplicationUnderTest(IApplicationSource source, ApplicationSettings settings, IBrowserLifecycle browser)
     : this(source.GetType().Name, settings.RootUrl, browser, () =>
 {
     var app = source.BuildApplication();
     return(app.Bootstrap().Factory);
 })
 {
 }
 public ApplicationUnderTest(FubuRuntime runtime, ApplicationSettings settings, IBrowserLifecycle browser)
     : this(settings.Name, settings.RootUrl, browser, () => runtime.Factory)
 {
 }
Exemple #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);
        }
        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));
        }
        public IApplicationUnderTest Start(ApplicationSettings settings, FubuRuntime runtime, IBrowserLifecycle lifecycle)
        {
            var application = new ApplicationUnderTest(runtime, settings, lifecycle);

            application.Ping();

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