title: How to open Device from Google Chrome Emulator using WebDriver C#
body: <p>I have the following code, </p>
  
  <pre><code>[Binding]
  public class Setup
  {
      private readonly Context _context;
      public const int DefaultTimeOut = 10;
  
      public Setup(Context context)
      {
          _context = context;
      }
  
      public static IWebDriver Driver;
  
      [BeforeTestRun]
      public static void SetUpBrowser()
      {
          ChromeOptions options = new ChromeOptions();
          options.EnableMobileEmulation("Apple iPhone 6");
          Driver = new ChromeDriver(options);
          Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(DefaultTimeOut);
      }
  </code></pre>
  
  <p>I want to be able to run the browser using Google Chrome's emulator, but unfortunately, I'm recieving the following error message: "Message: There is already an option for the mobileEmulation capability. Please use the instead. Parameter name: capabilityName"</p>
  
  <p>It'd be even more beneficial if I could use this outside the SetUpBrowser method, e.g. within a method that runs later in my test, I was thinking possibly adding the above to ChromeOptions but I didn't have any success</p>
  
  <p>The way in which I tried the above is: </p>
  
  <pre><code>[Binding]
  public class Setup
  {
      private readonly Context _context;
      public const int DefaultTimeOut = 10;
  
      public Setup(Context context)
      {
          _context = context;
      }
  
      public static IWebDriver Driver = new ChromeDriver();
  
      [BeforeTestRun]
      public static void SetUpBrowser()
      {
          Driver.Manage().Window.Maximize();
          Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(DefaultTimeOut);
      }
  </code></pre>
  
  <p>And the method in which I want to switch to the Mobile Emulator was:</p>
  
  <pre><code>    [Given(@"I am on the mobile website version")]
      public void GivenIAddAmOnTheMobileWebsiteVersion()
      {
          ChromeOptions options = new ChromeOptions();
          options.EnableMobileEmulation("Apple iPhone 6");
          Cookie SetMobileCookie = new Cookie(VariableList.MobileCookieValue, "true");
          MobileCookie = VariableList.MobileCookieValue;
          _driver.Manage().Cookies.AddCookie(SetMobileCookie);
          _driver.Click(ElementType.Id, VariableList.MemberLoginButton); //should be a new method
      }
  </code></pre>