public static IWebDriver CreateWebDriver(MethodInfo testMethod, RemoteWebDriverCapability capability, string hub)
        {
            DesiredCapabilities capabilities = null;

            switch (capability)
            {
            case RemoteWebDriverCapability.Andriod:
                capabilities = DesiredCapabilities.Android();
                break;

            case RemoteWebDriverCapability.Chrome:
                capabilities = DesiredCapabilities.Chrome();
                break;

            case RemoteWebDriverCapability.FireFox:
                capabilities = DesiredCapabilities.Firefox();
                break;

            case RemoteWebDriverCapability.HtmlUnit:
                capabilities = DesiredCapabilities.HtmlUnit();
                break;

            case RemoteWebDriverCapability.HtmlUnitWithJS:
                capabilities = DesiredCapabilities.HtmlUnitWithJavaScript();
                break;

            case RemoteWebDriverCapability.InternetExplorer:
                capabilities = DesiredCapabilities.InternetExplorer();
                break;

            case RemoteWebDriverCapability.IPad:
                capabilities = DesiredCapabilities.IPad();
                break;

            case RemoteWebDriverCapability.IPhone:
                capabilities = DesiredCapabilities.IPhone();
                break;

            case RemoteWebDriverCapability.Safari:
                capabilities = DesiredCapabilities.Safari();
                break;
            }

            if (string.IsNullOrEmpty(hub))
            {
                var attr = ReflectionHelper.GetAttribute <RemoteWebDriverHubAddressAttribute>(testMethod);

                if (attr != null)
                {
                    hub = attr.Hub;
                }
            }

            return(CreateWebDriverInstance(testMethod, hub, capabilities));
        }
 public RemoteDriverAttribute(RemoteWebDriverCapability capability)
 {
     Capability = capability;
 }
 public abstract IEnumerable <IWebDriver> ProvideDriver(IMethodInfo testMethod, RemoteWebDriverCapability capability);