Esempio n. 1
0
        /// <summary>
        /// Gets the browser flags from a service.
        /// </summary>
        /// <returns>The flags.</returns>
        /// <param name="driver">The web driver.</param>
        /// <param name="flagsProvider">A flags provider service.</param>
        /// <param name="desiredCapabilities">The desired capabilities.</param>
        protected virtual IReadOnlyCollection <string> GetFlags(IHasCapabilities driver,
                                                                IGetsBrowserFlags flagsProvider,
                                                                ICapabilities desiredCapabilities)
        {
            var identification = identificationFactory.GetIdentification(driver, desiredCapabilities);

            return(flagsProvider?.GetFlags(identification));
        }
Esempio n. 2
0
 /// <summary>
 /// Gets identification information about the given web driver.
 /// </summary>
 /// <returns>The browser identification.</returns>
 /// <param name="webDriver">Web driver.</param>
 public static BrowserIdentification GetIdentification(this IWebDriver webDriver)
 => browserIdFactory.GetIdentification(webDriver as IHasCapabilities);