Пример #1
0
        public static AxeResult Analyze(this IWebDriver webDriver, AxeBuilderOptions axeBuilderOptions)
        {
            if (webDriver == null)
            {
                throw new ArgumentNullException(nameof(webDriver));
            }

            AxeBuilder axeBuilder = new AxeBuilder(webDriver, axeBuilderOptions);

            return(axeBuilder.Analyze());
        }
Пример #2
0
        /// <summary>
        /// Initialize an instance of <see cref="AxeBuilder"/>
        /// </summary>
        /// <param name="webDriver">Selenium driver to use</param>
        /// <param name="options">Builder options</param>
        public AxeBuilder(IWebDriver webDriver, AxeBuilderOptions options)
        {
            if (webDriver == null)
            {
                throw new ArgumentNullException(nameof(webDriver));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _webDriver = webDriver;
            _webDriver.Inject(options.ScriptProvider);
        }