For information about recording scripts for native applications, see Creating scripts for native mobile applications.
To create a script for visiting a website on a mobile device, record the actions you perform while using the device.
If you usually use the same settings when you record scripts, you can specify default selections in the Global Preferences screen. These defaults will be applied when you begin recording, so you do not have to change the settings individually each time.
Click REC to start recording.
Select Mobile Device.
The options specific to mobile devices become available.
Specify the mobile device to emulate.
If you defined a mobile device in the Global Preferences, that device is specified automatically for this script. Click Change device if you want to emulate a different device.
If no default device is defined, click Select Device and select the mobile device in the Device Manager screen.
For more information about defining the mobile device, see Using the Mobile Device Manager.
Optional: Click Customize to open the Customize Profile dialog box, where you can change the device name, user agent, and/or headers.
You can use this window to save the custom profile or to load an existing profile.You can also apply a custom profile after you have recorded the script. For more information, see Using custom profiles.
To emulate a mobile device's ability to provide GPS information, click Select Location to open the Mobile Locationdialog box. This option is available only after you select Mobile Device.
From the drop-down list, select one of the following settings:
No Location – The default. The script will not use location information.
Custom Location – Enter latitude and longitude in the fields. For southern latitude and western longitude, use negative numbers.
Use the mobile node location – With this option, when the script is uploaded to the Synthetic Classic Portal, it uses the location of the mobile node that runs the script.
Because node coordinates are not available when you run the script locally, selecting this option displays fields for you to enter latitude and longitude for local playback. If you leave these fields blank, the script will use the default location, the Dynatrace office in Detroit, Michigan. When the script is uploaded to the Synthetic Classic Portal, the node location overrides these local playback coordinates.
By default, the script captures each keystroke, creating Type actions. To capture the value entered in a field instead of individual keystrokes, select FormFill to create FormFill actions wherever possible.
When you select FormFill, for some keys that you type (Tab, Enter, and Ctrl or Alt combinations), Type actions will appear. You can toggle between Keystrokes and FormFill at any time while recording the script.
If using the website includes entering sensitive data such as a password or personal information, enable FormFill, then encrypt the field values after you have recorded the script.
The HTTP Capture option creates static requests for any objects generated through a particular plugin on the page, for example Flash or Silverlight. The option is OFF by default because when Enable Flash Playback or Enable Silverlight Playback is selected in the playback settings, HTTP Capture is redundant.
To capture the actions for scrolling the page, make sure Scroll Capture On is selected. By default, this option is Off.
For more information, see Scroll script action.
In the address bar, replace
about:blank with the URL of the website where you want to begin the script, then click or press Enter.
The Mobile Recorder toolbar and window are launched. Use the Mobile Recorder instead of the main Recorder window to record your mobile script.
Use the mouse pointer in the Mobile Recorder window as if you were using fingertips on a mobile device screen. For example, a mouse click is a Tap, and clicking-and-dragging is a Swipe.
As you navigate, your actions are displayed in the timeline as they are recorded. As the actions are added to the timeline, they are separated into steps. A step is a set of actions that have been grouped together for your convenience. The default steps roughly correspond to a webpage view, but are not limited to being a page view.
It is recommended that you add a test at the end of the script whenever possible to make sure it ends correctly. Add a Validate action and enter a string that will appear on the last page that the script visits.
Creating SMS actions
When playing back transactions that use SMS actions, the Recorder assumes that it sends SMS messages successfully and receives a text message matching the criteria you provided. When run on the Active Mobile Peer network, actual SMS messages will be sent and received.
During the recording of a script, if the agent encounters an HTTP authentication request and prompts you for the username and password, these credentials are inserted in the step.
You can also add this information manually to the step after you finish recording:
- Click the step name in the timeline.
- If necessary, click the small right-pointing arrow next to the step name below the timeline to display the HTTP Authentication fields.
- Enter the Username and Password for basic or digest HTTP authentication. For NT LAN Manager (NTLM), also enter the Machine Name and the Domain Name.
The information is saved automatically.
Uploading and viewing scripts in the Synthetic Classic Portal
Scripts recorded for mobile devices can only be provisioned and used for Synthetic Mobile tests. If you record a script for a mobile device and upload it to the Synthetic Classic Portal, you will not be able to view the script in the Synthetic Classic Portal unless your account includes Mobile. Likewise, you cannot view non-mobile scripts when provisioning Mobile tests.