Open chrome mobile emulator with selenium c#

Hi guys, I am going to run a test mobile emulator with selenium and VS C#


using System;
using System.Threading;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.Chrome;

Driver Utils Class

First of all delclaring the webdriver, which will be used for open specfic browser

namespace SeleniumAutomation
public class Setup
       IWebDriver webDriver;

Open Chrome

public void Open_Browser()
 webDriver = new ChromeDriver();


Open Chrome Mobile Emulator

 public void Mobile_Emulator_Browser()
 ChromeOptions chromeCapabilities = new ChromeOptions();
 chromeCapabilities.EnableMobileEmulation("Pixel 5");
 webDriver = new ChromeDriver(chromeCapabilities);


I think it will be helpful to run chrome in mobile emulator