/// <inheritdoc /> public IContainer Create(IDictionary <Type, string> strategies, Assembly moduleAssembly) { var container = new LocalContainer(strategies) .ExecuteInstaller(new AutoInstaller(moduleAssembly)); return(container); }
private static IContainer CreateContainer(IDictionary <Type, string> strategies) { var container = new LocalContainer(strategies); container.LoadComponents <IRootClass>(); container.LoadComponents <IConfiguredComponent>(); container.Register <IRootClassFactory>(); return(container); }
public WebDriverManager(WebDriverConfig config) { Config = config; _container = new ThreadLocal<LocalContainer>(() => { var cont = new LocalContainer(); cont._driver = Config.CreateDriver(); cont._javaScriptExecutor = new JavaScriptExecutor(cont._driver); cont._wait = new WebDriverWait(cont._driver, Config.WaitTimeout); return cont; }); }
public WebDriverManager(WebDriverConfig config) : base(config) { Config = config; _container = new ThreadLocal <LocalContainer>(() => { var cont = new LocalContainer(); cont.Driver = Config.CreateDriver(); cont.Wait = new WebDriverWait(cont.Driver, Config.WaitTimeout); cont.JavaScriptExecutor = cont.Driver as IJavaScriptExecutor; if (cont.JavaScriptExecutor == null && Config.IsJavaScriptEnabled) { throw new TestLibsException($"Can't initialize JavaScript executor for WebDriver: {cont.Driver}"); } return(cont); }); }
public WebDriverManager(WebDriverConfig config) : base(config) { Config = config; _container = new ThreadLocal<LocalContainer>(() => { var cont = new LocalContainer(); cont.Driver = Config.CreateDriver(); cont.Wait = new WebDriverWait(cont.Driver, Config.WaitTimeout); cont.JavaScriptExecutor = cont.Driver as IJavaScriptExecutor; if (cont.JavaScriptExecutor == null && Config.IsJavaScriptEnabled) { throw new TestLibsException($"Can't initialize JavaScript executor for WebDriver: {cont.Driver}"); } return cont; }); }
public void Init() { _container = new LocalContainer(); _container.ExecuteInstaller(new AutoInstaller(GetType().Assembly)); }