3

I am using TestCafe to perform end to end testing in my project, and using browserstack to support cross-browser testing.

I was able to use browserstack for different browsers in Linux and Windows. But I was not able to test in browsers for mobile devices.

For eg. "browserstack:opera:Windows XP" works for opera browser in Windows XP. How to give the same for browsers in mobile devices. I tried checking browser supported with "testcafe -b browserstack", but did not get anything for mobile devices.

Alex Skorkin
  • 4,034
  • 3
  • 21
  • 44
Presha
  • 96
  • 6
  • 4
    I've checked the `testcafe -b browserstack` command with my BrowserStack account and it works as expected. I can only suppose that your subscription plan is limited only for desktop. I believe you can clarify this in BrowserStack support. – Alex Kamaev Mar 29 '19 at 11:20

2 Answers2

4

To run tests on mobile devices using TestCafe with BrowserStack, please execute the command as:

testcafe "browserstack:device_name@os_version" "/Users/abhishekmordani/Documents/stack/lang/node/TestCafe/samp_1.js"

You can refer the link for device names and os_version https://www.browserstack.com/list-of-browsers-and-platforms/js_testing

ANM1996
  • 131
  • 3
  • This is helpful, but is there a way we can say `testcafe "browserstack:device_name@browser_option"` ?? I'd like to run native browsers for mobile devices (i.e. _Safari_ w/ iPhone, _Samsung Internet_ w/ Samsung Galaxy devices etc) – Rob C Apr 14 '20 at 20:41
0

It appears that while Chrome on iOS is supported on BrowserStack Live, it is not available on BrowserStack Automate: https://www.browserstack.com/question/659

Andrew Harrison
  • 101
  • 1
  • 2