Can I run tests on smartphones and tablets? How do I record scenarios?
  • 14 Mar 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Can I run tests on smartphones and tablets? How do I record scenarios?

  • Dark
    Light

Article Summary

⚠︎ The Chrome Mobile Device Environment (Autify Cloud Environment) is available on particular plans. For details, please confirm this page.

⚠︎ PC & Mobile browsers on real devices are available on particular plans. For details, please confirm this page.


Yes, you can. This article explains how to how to record and execute scenarios for mobile devices such as smartphones and tablets.

How to Record Scenarios for Mobile Devices

There are two main ways to record test scenarios for mobile devices:

1. Select a mobile size from the Window Size menu before recording
2. Select an appropriate screen size in Chrome's Developer Tools before recording

The mobile size you can select from the Window Size menu is iPhone X. If you wish to record a scenario for iPhone X, choose method 1. If you wish to pick a different mobile size, choose method 2.

Select a mobile size from the Window Size menu before recording

  1. Open the Create New Scenario page.

  2. Select a mobile window size from the Window Size dropdown menu and launch the recording window.
    Screen Shot 2022-12-26 at 14.29.00.png

  3. The window will open in mobile size. You can now begin recording. You can create a scenario for your mobile site by clicking, typing, and inserting assertions as you usually would.

Note: If you select a window size with a mobile device name (e.g., iPhone X), the user agent for accessing the target site during recording will be set to the same mobile device.

Select an appropriate screen size in Chrome's Developer Tools before recording

  1. Open the Create New Scenario page.

  2. Select a PC window size from the Window Size dropdown menu and launch the recording window.

  3. Open Google Chrome's Developer Tools.
    Windows : Ctrl + Shift + I
    Mac : ⌥ + ⌘ + I

  4. Press the button that switches to mobile view.
    Screen Shot 2022-12-26 at 14.31.26.png

  5. Select your preferred device size.
    Screen Shot 2022-12-26 at 14.32.33.png

  6. You can now create a scenario for your mobile site by clicking, typing, and inserting assertions as you usually would.
    However, the feature that highlights the target element in gray when inserting assertions is unavailable while recording scenarios for mobile sites. This is due to technical limitations. If you have trouble selecting the target element, please contact our support team.

How to Run Mobile Tests

On Autify, there are these ways you can execute tests:

  1. Execute by clicking the "Run Now iPhone X (Emulator)" button.
  2. Execute via the Test Plans.
    2-1. Execute on Device Mode in Chrome DevTools.
    2-2. Execute on a real device.

1. Run a test by clicking "Run Now iPhone X (Emulator)"

If the scenario's Window Size is set to mobile size (375x812), the "Run Now iPhone X (Emulator)" button will appear. Once you click this button, the test will immediately run on an iPhone X emulator.

Screen Shot 2022-12-26 at 14.34.31.png

2. Execute via the Test Plans

You can select the mobile execution environment via Test Plans.
In the Test Plan, you can select emulators and real devices as the execution environment for mobile devices.

Screen Shot 2022-12-26 at 14.38.12.png

Screen Shot 2022-12-26 at 14.38.25.png

2-1. Run a test on an emulator

When you run a test on an emulator, the test will be executed on Device Mode of the Chrome DevTools.

Device Mode in Chrome DevTools is a feature that simulates various device screen sizes, user agents, etc. For more information on Device Mode, please click here.

This method has the following characteristics:

  • Since the test will not run on a real device, it's only suitable as a quick check and cannot be used for rigorous testing, such as whether the mobile OS and mobile browsers have an effect.
  • It is considerably faster than running the test on a real device.
  • It's available on plans that allow you to use the Chrome Mobile Device Environment plans.

2-2. Run a test on a real device

When you run a test on a real device, the test will be executed on an actual device located in an "external device farm."

This method has the following characteristics:

  • The test is performed on an actual device with the device's standard browser launched, so you can check the effects of the OS and browser.
  • It is considerably slower than running the test in Device Mode.
  • It is available on plans that allow you to use a real mobile browser.

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.