ChromeOptionsEnableMobileEmulation Method (ChromeMobileEmulationDeviceSettings)WebDriver
Allows the Chrome browser to emulate a mobile device.

Namespace: OpenQA.Selenium.Chrome
Assembly: WebDriver (in WebDriver.dll) Version: 3.1.0
Syntax

public void EnableMobileEmulation(
	ChromeMobileEmulationDeviceSettings deviceSettings
)

Parameters

deviceSettings
Type: OpenQA.Selenium.ChromeChromeMobileEmulationDeviceSettings
The ChromeMobileEmulationDeviceSettings object containing the settings of the device to emulate.
Exceptions

ExceptionCondition
ArgumentExceptionThrown if the device settings option does not have a user agent string set.
Remarks

Specifying an invalid device name will not throw an exeption, but will generate an error in Chrome when the driver starts. To unset mobile emulation, call this method with as the argument.
See Also

Reference