-
Hi im working with Perfectomobile cloud for testing, to run on desktop I use these parameters: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @tallevy22, the Use # Run tests using Chrome's mobile device emulator (default settings)
pytest test_swag_labs.py --mobile
# Run mobile tests specifying CSS Width, CSS Height, and Pixel-Ratio
pytest test_swag_labs.py --mobile --metrics="411,731,3"
# Run mobile tests specifying the user agent
pytest test_swag_labs.py --mobile --agent="Mozilla/5.0 (Linux; Android 9; Pixel 3 XL)" If you're running tests on a Selenium Grid that supports mobile emulation, you may need to pass that option as part of the capabilities file instead (if the |
Beta Was this translation helpful? Give feedback.
Hi @tallevy22, the
--mobile
option enables the Chromium Mobile Device Emulator, which works for both Chrome browsers and Edge browsers. Here are the full details about it from the SeleniumBase docs:Use
--mobile
to quickly run your tests using Chrome's mobile device emulator with default values for device metrics (CSS Width, CSS Height, Pixel-Ratio) and a default value set for the user agent. To configure the mobile device metrics, use--metrics="CSS_Width,CSS_Height,Pixel_Ratio"
to set those values. You'll also be able to set the user agent with--agent="USER-AGENT-STRING"
(a default user agent will be used if not specified). To find real values for device metrics, see this GitHub Gist.…