DevExpress / testcafe-browser-provider-saucelabs

This is the Sauce Labs browser provider plugin for TestCafe.

Home Page:https://devexpress.github.io/testcafe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot switch between landscape and portrait mode using saucelabs device emulator or simulator

mishmaccas opened this issue · comments

commented

I use device emulators or simulators for running TestCafe automation tests
e.g. command
testcafe "saucelabs:iPad Pro (12.9 inch) Simulator@12.2" tests/Navigation/*.js

I cannot do the following device orientations, which is a real limitation:

1/ Preset configure device simulator to landscape or portrait mode
E.g
With selenium you can set caps
"deviceOrientation": “portrait”
"deviceOrientation": “landscape”

2/ change device simulator orientation
E.g.
With appium you can rotate the device from portrait to landscape in the code

How can we add these abilities to testcafe /saucelabs?
Is there a way of doing this already?

Hi @mishmaccas

Use the SAUCE_CONFIG_PATH environment variable to specify the path to the file that contains additional job options in the JSON format. In this file you can specify device orientation of the used device emulator. See all options in the TestConfigurationOptions help topic.

commented

Thankyou I will try that out
I thought they were options for selenium/appium only

One Final Question @miherlosev
What about rotating the device midway thru a testcafe remote or saucelabs test?
Can I raise this as an enhancement in the TestCafe project?

It cannot be done in TestCafe, because this strictly depends on the browser provider. For example, it can be done in providers that use Selenium internally, but cannot be done in IE.

In addition, you already can set the deviceOrientation option in Chrome:
https://devexpress.github.io/testcafe/documentation/using-testcafe/common-concepts/browsers/using-chrome-device-emulation.html . Please note that you cannot change it during the test.