Mobile Emulation
Since v2.33.0
Chrome and Edge
Gwen supports mobile emulation in Chrome and Edge browser sessions.
Device name setting
To enable mobile emulation by a known device, set the following setting to a valid device name listed in the Dev Tools emulation panel of your Chrome browser.
Example:
To emulate the Pixel 2 device:
gwen.web.chrome.mobile.deviceName = Pixel 2
Device metric settings
Alternatively, to enable mobile emulation by specific device metrics, set the following settings to explicit values:
- Chrome
gwen.web.chrome.mobile.width
gwen.web.chrome.mobile.height
gwen.web.chrome.mobile.pixelRatio
gwen.web.chrome.mobile.touch
gwen.web.chrome.mobile.userAgent
- Edge
gwen.web.edge.mobile.width
gwen.web.edge.mobile.height
gwen.web.edge.mobile.pixelRatio
gwen.web.edge.mobile.touch
gwen.web.edge.mobile.userAgent
Example:
- conf
- json
- properties
gwen {
web {
chrome {
mobile {
width = 360
height = 640
pixelRatio = 3.0
touch = true
userAgent = "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19"
}
}
}
}
{
"gwen": {
"web": {
"chrome": {
"mobile": {
"width": 360,
"height": 640,
"pixelRatio": 3.0,
"touch": true,
"userAgent": "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19"
}
}
}
}
}
gwen.web.chrome.mobile.width = 360
gwen.web.chrome.mobile.height = 640
gwen.web.chrome.mobile.pixelRatio = 3.0
gwen.web.chrome.mobile.touch = true
gwen.web.chrome.mobile.userAgent = Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19