Emulate a mobile or tablet device? Set userAgent to mobile?
Posted: Thu Jun 13, 2019 8:01 am
Not sure if it's even possible, but maybe you can point out to the right direction.
In Chrome/FF, we can emulate a mobile device with different screensizes and which also sets the browser userAgent to the specific "tablet" or "phone" mode.
Ref to a generic user agent detection https://www.abeautifulsite.net/detecting-mobile-devices-with-javascript
Is this possible to set the userAgent with siesta?
The screen size probably one could simulate by limiting the size of the view, but can we enforce the user agent?
I searched through the examples and found nothing in this direction.
The problem:
- same views behave/look differently on desktop/tablet and mobile
- currently we can see only the "desktop" mode
The use-case would be the following:
- the same view behaves differently on desktop, tablet and phone
- test this view on different modes(desktop, tablet and phone) and check if components are visible or not etc...
Can you provide some directions?
In Chrome/FF, we can emulate a mobile device with different screensizes and which also sets the browser userAgent to the specific "tablet" or "phone" mode.
Ref to a generic user agent detection https://www.abeautifulsite.net/detecting-mobile-devices-with-javascript
Is this possible to set the userAgent with siesta?
The screen size probably one could simulate by limiting the size of the view, but can we enforce the user agent?
I searched through the examples and found nothing in this direction.
The problem:
- same views behave/look differently on desktop/tablet and mobile
- currently we can see only the "desktop" mode
The use-case would be the following:
- the same view behaves differently on desktop, tablet and phone
- test this view on different modes(desktop, tablet and phone) and check if components are visible or not etc...
Can you provide some directions?