private bool IsRemoteInstanceOfBrowser(Browser desiredBrowser)
{
bool isRemoteInstance = false;
switch (desiredBrowser)
{
case Browser.IE:
if (EnvironmentManager.Instance.RemoteCapabilities == "internet explorer")
{
isRemoteInstance = true;
}
break;
case Browser.Firefox:
if (EnvironmentManager.Instance.RemoteCapabilities == "firefox")
{
isRemoteInstance = true;
}
break;
case Browser.HtmlUnit:
if (EnvironmentManager.Instance.RemoteCapabilities == "htmlunit")
{
isRemoteInstance = true;
}
break;
case Browser.Chrome:
if (EnvironmentManager.Instance.RemoteCapabilities == "chrome")
{
isRemoteInstance = true;
}
break;
case Browser.IPhone:
if (EnvironmentManager.Instance.RemoteCapabilities == "iphone")
{
isRemoteInstance = true;
}
break;
case Browser.Android:
if (EnvironmentManager.Instance.RemoteCapabilities == "android")
{
isRemoteInstance = true;
}
break;
}
return isRemoteInstance;
}