static BrowserHost() { Instance.Run(configure => configure .WithWebServer(new InternetWebServer("https://qa-platform.authenticateis.com/"))); RootUrl = Instance.Application.Browser.Url; }
public void FixtureSetup() { _host = new SelenoHost(); _host.Run("TestStack.Seleno.AcceptanceTests.Web", 12324, x => x.WithRouteConfig(RouteConfig.RegisterRoutes) .WithEnvironmentVariable("FunctionalTest", "SomeVal")); }
static BrowserHost() { //Chrome Instance.Run("PandaWebApp", 80, w => w.WithRemoteWebDriver(() => new ChromeDriver())); //FireFox // Instance.Run("PandaWebApp", 80); }
static BrowserHost() { // Instance.Run("Blog", 60639); Instance.Run("Blog", 60639, w => w.WithRemoteWebDriver(() => new ChromeDriver())); RootUrl = Instance.Application.Browser.Url; }
protected override void Load(ContainerBuilder builder) { var selenoHost = new SelenoHost(); selenoHost.Run("ContosoUniversity", 12365, c => c.WithRouteConfig(RouteConfig.RegisterRoutes)); builder.RegisterInstance(selenoHost).AsSelf().SingleInstance(); builder.RegisterType <WebUiDriver>().AsSelf(); DependenciesConfig.ConfigureDependencies(builder); //builder.RegisterGeneric(typeof(ViewStudentDetailsScenario)) // .AsSelf() // .PropertiesAutowired() // .InstancePerLifetimeScope(); builder.RegisterSource(new ContravariantRegistrationSource()); builder.RegisterAssemblyTypes(typeof(IMediator).Assembly).AsImplementedInterfaces(); builder.RegisterAssemblyTypes(typeof(FunctionalTestsAutofacModule).Assembly).AsImplementedInterfaces(); builder.Register <SingleInstanceFactory>(ctx => { var c = ctx.Resolve <IComponentContext>(); return(t => c.Resolve(t)); }); builder.Register <MultiInstanceFactory>(ctx => { var c = ctx.Resolve <IComponentContext>(); return(t => (IEnumerable <object>)c.Resolve(typeof(IEnumerable <>).MakeGenericType(t))); }); builder.RegisterType <StudentDetailsPage>().As(typeof(IPage <Student>)); }
static BrowserHost() { //Instance.Run("Blog", 60634, w => w.WithRemoteWebDriver(() => new FirefoxDriver())); Instance.Run("Blog", 60634, config => config.WithRemoteWebDriver(() => new FirefoxDriver())); RootUrl = Instance.Application.Browser.Url; }
public void Closing_SelenoHost_should_close_child_browser(string driverName) { // ARRANGE Process.GetProcessesByName(driverName).ForEach(StopProcess); var selenoHost = new SelenoHost(); Func <RemoteWebDriver> driver = GetBrowserFactory(driverName); selenoHost.Run("TestStack.Seleno.AcceptanceTests.Web", 12346, c => c.WithRemoteWebDriver(driver)); // Somehow, Firefox spawns 6 processes const int NumberOfFirefoxProcesses = 6; int NumberOfExpectedProcesses; switch (driverName) { case Firefox: NumberOfExpectedProcesses = NumberOfFirefoxProcesses; break; default: NumberOfExpectedProcesses = 1; break; } Process.GetProcessesByName(driverName).Length.Should().Be(NumberOfExpectedProcesses); // ACT selenoHost.Dispose(); // ASSERT Process.GetProcessesByName(driverName).Should().BeEmpty(); }
static BrowserHost() { //Chrome Instance.Run("Blog", 60634, w => w.WithRemoteWebDriver(() => new ChromeDriver())); //FireFox // Instance.Run("Blog", 60634); }
static Host() { Instance.Run("TestStack.Seleno.AcceptanceTests.Web", 12346, c => c .UsingLoggerFactory(new ConsoleFactory()) .WithMinimumWaitTimeoutOf(TimeSpan.FromSeconds(1)) .WithRouteConfig(RouteConfig.RegisterRoutes)); }
public void FixtureSetup() { _host = new SelenoHost(); _host.Run(x => x .WithWebServer(new InternetWebServer("http://www.google.com/")) ); _host.Application.Browser.Manage().Window.Size = new Size(750,750); }
static Host() { Instance.Run("ChameleonForms.Example", 12345, c => c .WithMinimumWaitTimeoutOf(TimeSpan.FromSeconds(1)) .UsingCamera(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase.Replace("file:///", "")), "screenshots")) .WithRemoteWebDriver(() => Browser) ); }
//public static readonly string RootUrl; static BrowserHost() { // Instance.Run("Blog", 60638); Instance.Run("Blog", 60638, w => w.WithRemoteWebDriver(() => new ChromeDriver())); //Instance.Run("Blog", 60634, w => w.WithRemoteWebDriver(BrowserFactory.Chrome)); // RootUrl = Instance.Application.Browser.Url; }
public void FixtureSetup() { _host = new SelenoHost(); _host.Run(x => x .WithWebServer(new InternetWebServer("http://www.google.com/")) ); _host.Application.Browser.Manage().Window.Size = new Size(750, 750); }
public static void Start() { SelenoHost.Run(@"SelenoTest.App", 12346, c => c .UsingLoggerFactory(new ConsoleFactory()) .WithRouteConfig(RouteConfig.RegisterRoutes) .WithRemoteWebDriver(GetChromeDriver) ); }
protected override void Load(ContainerBuilder builder) { var selenoHost = new SelenoHost(); selenoHost.Run("ContosoUniversity", 12365, c => c.WithRouteConfig(RouteConfig.RegisterRoutes)); builder.RegisterInstance(selenoHost).AsSelf().SingleInstance(); builder.RegisterType <BrowserHost>().AsSelf(); }
static Host() { Instance.Run("Name.Of.Your.Web.Project", 12346, c => c .UsingLoggerFactory(new ConsoleFactory()) // If you are using MVC then do this where RouteConfig is the class that registers your routes in the "Name.Of.Your.Web.Project" project // If you aren't using MVC then don't include this line .WithRouteConfig(RouteConfig.RegisterRoutes) ); }
static Host() { Instance.Run(x => x.WithWebServer(new InternetWebServer(HostUrl))); //Instance.Run(x => x.WithWebServer(new InternetWebServer(HostUrl + AppConfigHandler.GetValue("LoginPage"))) // // comment out this line if you want to run the tests locally // //.WithRemoteWebDriver(RemoteDriver) // ); Driver.Manage().Window.Size = new Size(1280, 768); }
public void FixtureSetup() { _host = new SelenoHost(); _host.Run(x => x .UsingCamera(@"c:\screenshots") .WithWebServer(new InternetWebServer("http://www.google.com/")) .WithMinimumWaitTimeoutOf(TimeSpan.FromMilliseconds(100)) .UsingLoggerFactory(new ConsoleFactory(LoggerLevel.Debug)) ); }
static BrowserHost() { Instance.Run("UnitTesting", 4223, configure => configure .WithRemoteWebDriver(BrowserFactory.Chrome) .WithRouteConfig(RouteConfig.RegisterRoutes) // To allow us to navigate by selecting a controller and action rather than a url string ); RootUrl = Instance.Application.Browser.Url; }
static Host() { Instance = new SelenoHost(); Instance.Run("WebApplication", 7055); Instance.Application.Browser.Manage().Window.Maximize(); Thread.Sleep(5000); //new code changes //Instance.Run("WebApplication", 54881, configure => configure.WithRouteConfig(WebApplication.RouteConfig.RegisterRoutes).WithMinimumWaitTimeoutOf(System.TimeSpan.FromSeconds(3))); }
public void FixtureSetup() { _host = new SelenoHost(); _host.Run(x => x .UsingDomCapture(DomCaptureFolderPath) .WithWebServer(new InternetWebServer("https://www.google.com/")) .WithMinimumWaitTimeoutOf(TimeSpan.FromMilliseconds(100)) .UsingLoggerFactory(new ConsoleFactory(LoggerLevel.Debug)) ); }
private static void RunIisExpress() { var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SelenoScreenShots"); _instance = new SelenoHost(); _instance.Run("NGL.Web", 12345, c => c.WithRouteConfig(RouteConfig.RegisterRoutes) .UsingControlIdGenerator(new MvcControlIdGenerator()) .WithEnvironmentVariable("ConnectionString", DatabaseManager.ConnectionString) .UsingCamera(filePath)); }
static Host() { Instance.Run(configure => configure .WithWebServer(new InternetWebServer("http://miam.local")) .WithRouteConfig(RouteConfig.RegisterRoutes) .WithMinimumWaitTimeoutOf(TimeSpan.FromSeconds(5)) .WithRemoteWebDriver(fireFoxWebDriver) ); Instance.Application.Browser.Manage().Window.Maximize(); }
static BrowserHost() { //var t = // @"C:\_dev\mvcTesting\5-automated-aspdotnet-mvc-m5-exercise-files\after\StronglyTypedPageObjectModels\BankingSite\BankingSite.FunctionalUITests\bin\Debug\"; RemoteWebDriver y = new ChromeDriver(); // y.Navigate().GoToUrl("https://www.google.co.uk/"); Instance.Run("BankingSite", 4223, config => config.WithRouteConfig(RouteConfig.RegisterRoutes) .WithRemoteWebDriver(() => y)); RootUrl = Instance.Application.Browser.Url; }
public void RunTest() { using (var host = new SelenoHost()) { host.Run( x => x.WithRemoteWebDriver(() => WebDriver) .WithWebServer(new InternetWebServer("http://www.google.com/"))); var title = host.NavigateToInitialPage<Page>().Title; Assert.That(title, Is.EqualTo("Google")); } }
public void Closing_SelenoHost_should_close_child_browser(string driverName) { Process.GetProcessesByName(driverName).ForEach(StopProcess); var selenoHost = new SelenoHost(); Func<RemoteWebDriver> driver = GetBrowserFactory(driverName); selenoHost.Run("TestStack.Seleno.AcceptanceTests.Web", 12346, c => c.WithRemoteWebDriver(driver)); Process.GetProcessesByName(driverName).Length.Should().Be(1); selenoHost.Dispose(); Process.GetProcessesByName(driverName).Should().BeEmpty(); }
public void RunTest() { using (var host = new SelenoHost()) { host.Run( x => x.WithRemoteWebDriver(() => WebDriver) .WithWebServer(new InternetWebServer("http://www.google.com/"))); var title = host.NavigateToInitialPage <Page>().Title; Assert.That(title, Is.EqualTo("Google")); } }
public void Closing_SelenoHost_should_close_child_browser(string driverName) { Process.GetProcessesByName(driverName).ForEach(StopProcess); var selenoHost = new SelenoHost(); Func <RemoteWebDriver> driver = GetBrowserFactory(driverName); selenoHost.Run("TestStack.Seleno.AcceptanceTests.Web", 12346, c => c.WithRemoteWebDriver(driver)); Process.GetProcessesByName(driverName).Length.Should().Be(1); selenoHost.Dispose(); Process.GetProcessesByName(driverName).Should().BeEmpty(); }
public void Closing_SelenoHost_should_close_Iis_Express() { PatientlyStopProcess(IisExpress); Process.GetProcessesByName("chromedriver").ForEach(StopProcess); var selenoHost = new SelenoHost(); selenoHost.Run("TestStack.Seleno.AcceptanceTests.Web", 12346, c => c.WithRemoteWebDriver(BrowserFactory.Chrome)); Process.GetProcessesByName(IisExpress).Length.Should().Be(1); selenoHost.Dispose(); Process.GetProcessesByName("chromedriver").Should().BeEmpty(); Process.GetProcessesByName(IisExpress).Should().BeEmpty(); }
internal void Initalise() { switch (RunProfile) { case RunProfile.Remote: DesiredCapabilities capability = PopulateCapabilities(); SetBrowserStackCredentials(capability); Browser = new RemoteWebDriver(new Uri(browserStackBrowserUri), capability); var selenoHost = new SelenoHost(); selenoHost.Run(config => { config .WithRemoteWebDriver(() => Browser) .WithWebServer(new InternetWebServer(RootUrl)); }); Seleno = selenoHost; Seleno.Application.Browser.Manage().Window.Maximize(); break; case RunProfile.Owasp: var zapHost = ConfigurationManager.AppSettings["zapHost"]; var zapPort = ConfigurationManager.AppSettings["zapPort"]; Proxy proxy = new Proxy { SslProxy = $"{zapHost}:{zapPort}", HttpProxy = $"{zapHost}:{zapPort}", FtpProxy = $"{zapHost}:{zapPort}", }; Seleno = LocalBrowserHost.GetInstanceFor(BrowserName, RootUrl, proxy); RootUrl = Seleno.Application.WebServer.BaseUrl; break; case RunProfile.Local: default: Seleno = LocalBrowserHost.GetInstanceFor(BrowserName, RootUrl); RootUrl = Seleno.Application.WebServer.BaseUrl; Seleno.Application.Browser.Manage().Window.Maximize(); break; } }
static Host() { Instance.Run("Blog", 60639); //About Chrome Browser : Instance.Run("Blog", 60634, w => w.WithRemoteWebDriver(BrowserFactory.Chrome)); //RootUrl = Instance.Application.Browser.Url; }
static BrowserHost() { Instance.Run("Blog", 60639); }
static BrowserHost() { Instance.Run("Blog", 60634, w => w.WithRemoteWebDriver(() => new ChromeDriver())); }