Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SeleniumBrowser" /> class.
        /// </summary>
        /// <param name="driver">The browser driver as a lazy object.</param>
        /// <param name="logger">The logger.</param>
        public SeleniumBrowser(Lazy <IWebDriver> driver, ILogger logger) : base(logger)
        {
            this.driver = driver;

            this.pageBuilder = new SeleniumPageBuilder();
            this.pageCache   = new Dictionary <Type, Func <IWebDriver, IBrowser, Action <object>, object> >();
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SeleniumBrowser" /> class.
        /// </summary>
        /// <param name="driver">The browser driver as a lazy object.</param>
        /// <param name="logger">The logger.</param>
        public SeleniumBrowser(Lazy <IWebDriver> driver, ILogger logger) : base(logger)
        {
            // TODO: create timeouts structure, pass it through this constructor, so we know what the default timeouts are.
            this.driver = driver;

            this.pageBuilder = new SeleniumPageBuilder();
            this.pageCache   = new Dictionary <Type, Func <IWebDriver, IBrowser, Action <object>, object> >();
        }
Beispiel #3
0
        /// <summary>
        /// Creates the builder function.
        /// </summary>
        /// <returns>The created builder function.</returns>
        protected Func <ISearchContext, IBrowser, Action <object>, object> CreateBuilderFunction()
        {
            var builder = new SeleniumPageBuilder();

            return(builder.CreatePage(typeof(TChildElement)));
        }