Skip to content

Commit 3b416b4

Browse files
committed
Finish main Writer/Editor pass
1 parent bf5f4ab commit 3b416b4

File tree

2 files changed

+71
-52
lines changed

2 files changed

+71
-52
lines changed

microsoft-edge/devtools-guide-chromium/recorder/index.md

Lines changed: 69 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: msedgedevrel
66
ms.topic: conceptual
77
ms.service: microsoft-edge
88
ms.subservice: devtools
9-
ms.date: 02/14/2024
9+
ms.date: 02/21/2024
1010
---
1111
# Record and replay user flows and measure performance
1212

@@ -54,7 +54,7 @@ To start recording a new user flow:
5454

5555
![The recorded user interactions displayed as a list in the Recorder tool](./index-images/list-of-interactions.png)
5656

57-
1. To stop the recording, at the bottom of the list of recorded interactions, click **End recording**.
57+
1. To stop the recording, at the bottom of the list of recorded interactions, click the **End recording** button.
5858

5959
The recording stops, and the circle next to the recording name turns blue, indicating that the recording is complete:
6060

@@ -64,26 +64,31 @@ To start recording a new user flow:
6464
<!-- ====================================================================== -->
6565
## Record other user flows
6666

67-
To record a new user flow, once you've stopped the recording of the previous user flow, click the **Create a new recording** (![Create a new recording button](./index-images/new-recording-icon.png)) button in the top-left corner of the **Recorder** tool, and then repeat the steps from [Record a user flow](#record-a-user-flow):
67+
To record a new user flow, after you've stopped the recording of the previous user flow:
6868

69-
![The Create a new recording button](./index-images/create-new-recording.png)
69+
1. Click the **Create a new recording** (![Create a new recording button](./index-images/new-recording-icon.png)) button in the top-left corner of the **Recorder** tool:
70+
71+
![The 'Create a new recording' button](./index-images/create-new-recording.png)
72+
73+
1. Repeat the steps from [Record a user flow](#record-a-user-flow), above.
7074

7175

7276
<!-- ====================================================================== -->
7377
## Replay a user flow
7478

7579
You can replay user flows either from the list of recorded user flows, or when viewing the details of a given user flow.
7680

77-
* To view the list of recorded user flows, click the dropdown menu that's in the **Recorder** tool toolbar, at the top, and select **2 recording(s)**. The label might show a different number of recordings, depending on how many recordings you've made.
78-
* To view the details of a given user flow, click the dropdown menu that's in the **Recorder** tool toolbar, at the top, and click the name of the user flow you want to view.
81+
* To view the list of recorded user flows, click the dropdown menu that's in the **Recorder** tool toolbar, at the top, and then select **2 recording(s)**. The label might show a different number of recordings, depending on how many recordings you've made.
82+
83+
* To view the details of a given user flow, click the dropdown list that's in the **Recorder** tool toolbar, at the top, and then click the name of a user flow.
7984

8085

8186
<!-- ------------------------------ -->
8287
#### Replay a user flow from the list of recordings
8388

84-
1. Click **Play recording** next to the recording that you want to replay:
89+
1. Click the **Play recording** button next to a recording:
8590

86-
![The list of recordings, and the play button next to each recording](./index-images/play-from-list.png)
91+
![The list of recordings, with a 'Play recording' button next to each recording](./index-images/play-from-list.png)
8792

8893
1. Wait while the **Recorder** tool replays the previously recorded user interactions. An animation of the steps that are being replayed appears in the **Recorder** tool:
8994

@@ -95,7 +100,7 @@ You can replay user flows either from the list of recorded user flows, or when v
95100
<!-- ------------------------------ -->
96101
#### Replay a user flow from a recording
97102

98-
1. Click **Replay** in the top-right corner of the **Recorder** tool:
103+
1. Click the **Replay** button in the top-right corner of the **Recorder** tool:
99104

100105
![The Replay button on a recorded user flow details page](./index-images/play-from-recording.png)
101106

@@ -109,27 +114,33 @@ You can replay user flows either from the list of recorded user flows, or when v
109114
<!-- ------------------------------ -->
110115
#### Slowly replay a user flow to investigate issues
111116

112-
To see what's happening in the rendered page while the user interactions are being replayed, slow down the replay speed. By default, the **Recorder** tool replays user flows as fast as it can. To slow down the replay speed:
117+
To see what's happening in the rendered page while the user interactions are being replayed, slow down the replay speed. By default, the **Recorder** tool replays user flows as fast as it can.
118+
119+
To slow down the replay speed:
113120

114-
1. Click the dropdown arrow next to **Replay** in the top-right corner of the **Recorder** tool, and then select a speed from the dropdown menu, such as **Slow**, **Very slow**, or **Extremely slow**:
121+
* Click the dropdown arrow next to **Replay** in the top-right corner of the **Recorder** tool, and then select a speed from the dropdown menu, such as **Slow**, **Very slow**, or **Extremely slow**:
115122

116-
![The Replay button and the replay speed dropdown menu](./index-images/replay-slow.png)
123+
![The Replay button and the Speed dropdown menu](./index-images/replay-slow.png)
117124

118125

119126
<!-- ------------------------------ -->
120-
#### Pause while replaying a user flow by using step breakpoints
127+
#### Pause while replaying a user flow, by using breakpoints
121128

122-
To inspect the rendered webpage at a specific point of the user flow, pause the replay by using a breakpoint. To add a breakpoint to a user flow:
129+
To inspect the rendered webpage at a specific point of the user flow, pause the replay by using a breakpoint.
123130

124-
1. Click the **Open step actions** (![The Open step actions icon](./index-images/step-actions-icon.png)) icon next to the step you want to pause at, and then select **Add breakpoint**:
131+
To add a breakpoint to a user flow:
125132

126-
![The Open step actions icon and the Add breakpoint button](./index-images/add-breakpoint.png)
133+
1. Next to the flow step at which to pause, click the **Open step actions** (![The Open step actions icon](./index-images/step-actions-icon.png)) button , and then select **Add breakpoint**:
127134

128-
1. To start the user flow, click **Replay** in the top-right corner of the **Recorder** tool. The replay pauses when it reaches the step with the breakpoint. The **Continue** and **Execute one step** buttons also become available in the toolbar:
135+
![The 'Open step actions' button and the 'Add breakpoint' menu item](./index-images/add-breakpoint.png)
129136

130-
![The paused replay at a step with a breakpoint](./index-images/paused-replay.png)
137+
1. To start the user flow, click **Replay** in the top-right corner of the **Recorder** tool.
131138

132-
1. Click the **Execute one step** button to execute the next step and pause again, or click the **Continue** button to continue the replay until the next breakpoint, or the end of the user flow, is reached.
139+
The replay pauses when it reaches the step that has a breakpoint. The **Continue** and **Execute one step** buttons also become available in the toolbar:
140+
141+
![The paused replay at a step with a breakpoint](./index-images/paused-replay.png)
142+
143+
1. Click the **Execute one step** button to execute the next step and pause again, or click the **Continue** button to continue the replay until the next breakpoint (or the end of the user flow) is reached.
133144

134145

135146
<!-- ====================================================================== -->
@@ -161,24 +172,26 @@ After you've recorded a user flow, you can edit the steps of the user flow. For
161172

162173
To add a new step to an existing user flow:
163174

164-
1. Click the **Open step actions** (![The Open step actions icon](./index-images/step-actions-icon.png)) icon next to the step before or after which you want to add a new step, and then select **Add step before**, or **Add step after**:
175+
1. Click the **Open step actions** (![The 'Open step actions' icon](./index-images/step-actions-icon.png)) button next to the step before or after which you want to add a new step, and then select **Add step before** or **Add step after**:
165176

166-
![The Open step actions icon and the Add step button](./index-images/add-step.png)
177+
![The 'Open step actions' icon and the 'Add step' button](./index-images/add-step.png)
167178

168-
1. Follow the instructions in [Edit a step](#edit-a-step) to edit the details of the new step that you added. The new step is temporarily called **Wait for element**.
179+
1. Follow the instructions in [Edit a step](#edit-a-step) below, to edit the details of the new step that you added. The new step is temporarily named **Wait for element**.
169180

170181

171182
<!-- ------------------------------ -->
172183
#### Edit a step
173184

174185
To edit the details of an existing step:
175186

176-
1. To open the details section of the step you want to edit, click the triangle (![The triangle expand icon](./index-images/expand-icon.png)) icon next to the step. The details section of the step opens:
187+
1. To open the details section of the step you want to edit, click the triangle (![The triangle expand icon](./index-images/expand-icon.png)) button next to the step. The details section of the step opens:
188+
189+
![The expanded details section for a step of the user flow](./index-images/step-details.png)
177190

178-
![The expanded detailed section for a step of the user flow](./index-images/step-details.png)
191+
1. Edit the details of the step, such as the **type** of step, the **selectors** of the DOM element the step applies to, or the properties of the step. The various types of steps and their properties are listed in the section below. Your changes are saved automatically.
179192

180-
1. Edit the details of the step, such as the **type** of step, the **selectors** of the DOM element the step applies to, or the properties of the step. See below for more information about the different types of steps and their properties. Your changes are saved automatically.
181193

194+
<!-- ---------- -->
182195
###### Change the type of step
183196

184197
To change the type of step when editing the details of a step:
@@ -189,7 +202,7 @@ To change the type of step when editing the details of a step:
189202

190203
![The Type dropdown menu](./index-images/step-type-dropdown.png)
191204

192-
Below are the different types of steps that you can use when editing a step in a user flow. For each step type, the list of properties that apply to the step is also shown.
205+
You can use the following types of steps when editing a step in a user flow. Each step type has a list of properties that apply to the step.
193206

194207
| Step type | Description | Properties |
195208
|:--- |:--- |:--- |
@@ -207,29 +220,37 @@ Below are the different types of steps that you can use when editing a step in a
207220
| `waitForElement` | Wait for an element, or for multiple elements, to be present in the webpage. | **selectors**: ways to find the element this step applies to. |
208221
| `waitForExpression` | Wait until a JavaScript expression evaluates to `true`. | **expression**: the JavaScript expression to evaluate. |
209222

223+
224+
<!-- ---------- -->
210225
###### Edit the selectors of a step
211226

212-
Many step types have a **selectors** property, which specifies the DOM element that the step applies to. For example, a `click` step has a **selectors** property to define which element in the page is clicked when that step of the user flow runs.
227+
Many step types have a **selectors** property, which specifies the DOM element that the step applies to. For example, a `click` step has a **selectors** property to define which element in the page is clicked when that step of the user flow runs.
228+
229+
The **selectors** property is a list of one or more selectors. Each selector in the list can be a different way to find the element in the page. The **Recorder** tool tries each selector in the list, in order, until it finds an element in the page that matches the selector.
213230

214-
The **selectors** property is a list of one or more selectors, where each selector in the list can be a different way to find the element in the page. The **Recorder** tool tries each selector in the list, in order, until it finds an element in the page that matches the selector. A selectors can be:
231+
A selector can be any of the following types:
215232

216233
* A CSS selector, such as `#my-element-with-id` or `.my-class`.
217234
* A XPath selector, prefixed with `xpath/`, such as `xpath//html/body/form/div/label`.
218235
* The text content of the element, prefixed with `text/`, such as `text/Add a task`.
219236

220-
You can edit the selectors of a step either manually, or by selecting an element in the rendered webpage.
237+
You can edit the selectors of a step by either approach:
238+
* Selecting an element in the rendered webpage.
239+
* Manually add, remove, or modify a selector.
221240

222-
* To edit the selectors by selecting an element in the rendered webpage, click **Select an element in the page to update selectors**, and then click the element in the rendered webpage that you want to select. The **Recorder** tool updates the list of selectors to match the selected element:
241+
242+
* To edit the selectors by selecting an element in the rendered webpage, click **Select an element in the page to update selectors**, and then click the element in the rendered webpage that you want to select. The **Recorder** tool updates the list of selectors to match the selected element:
223243

224244
![The Select element button](./index-images/select-element-in-page.png)
225245

226-
* To edit the selectors manually, add, edit, or delete selectors:
246+
247+
* You can manually add, remove, or modify a selector:
227248

228249
* To add or remove a selector, under **Selectors**, hover over a selector, and then click **Add a selector** or **Remove a selector**:
229250

230251
![The Add and Remove a selector buttons](./index-images/add-remove-selector.png)
231252

232-
* To change the value of a selector, under **Selectors**, click the input box that contains the value of the selector, and then enter the new value of the selector:
253+
* To modify the value of a selector, under **Selectors**, click the input box that contains the value of the selector, and then enter the new value for the selector:
233254

234255
![The selector value input box](./index-images/edit-selector-value.png)
235256

@@ -239,23 +260,23 @@ You can edit the selectors of a step either manually, or by selecting an element
239260

240261
To delete a step from an existing user flow:
241262

242-
1. Click the **Open step actions** (![The Open step actions icon](./index-images/step-actions-icon.png)) icon next to the step you want to delete, and then select **Remove step**:
263+
1. Click the **Open step actions** (![The Open step actions icon](./index-images/step-actions-icon.png)) button next to the step you want to delete, and then select **Remove step**:
243264

244-
![The Open step actions icon and the Remove step button](./index-images/remove-step.png)
265+
![The 'Open step actions' button and the 'Remove step' button](./index-images/remove-step.png)
245266

246267

247268
<!-- ====================================================================== -->
248269
## Delete a user flow
249270

250271
To delete a previously recorded user flow, when viewing the list of recordings, click **Delete recording** (![The Delete recording icon](./index-images/delete-icon.png)) next to the recording you want to delete:
251272

252-
![The list of recordings, and the delete button next to each recording](./index-images/delete-recording.png)
273+
![The list of recordings, and the 'Delete recording' button next to each recording](./index-images/delete-recording.png)
253274

254275

255276
<!-- ====================================================================== -->
256277
## Export and import user flows as files
257278

258-
To share user flows with other people, for example to help other people reproduce a bug by running the same set of steps as you, export the user flows you recorded as files.
279+
To share a user flow with other people, export your recorded user flow as a JSON file. For example, sharing a user flow can help other people reproduce a bug by running the same set of steps as you.
259280

260281

261282
<!-- ------------------------------ -->
@@ -267,7 +288,7 @@ To share a user flow with another person, export the user flow as a JSON file:
267288

268289
![The Export button dropdown menu and the JSON option](./index-images/export-json.png)
269290

270-
1. Choose a location to save the file on your computer. The file is saved with the name of the user flow, and the extension `.json`.
291+
1. Select a location at which to save the file. The file is saved with the name of the user flow, and the extension `.json`.
271292

272293

273294
<!-- ------------------------------ -->
@@ -279,26 +300,24 @@ To import a user flow from a JSON file:
279300

280301
![The Import recording button](./index-images/import-recording.png)
281302

282-
1. In the file picker dialog that opens, select the JSON file that contains the user flow you want to import, and then click **Open**. The user flow is imported, and appears in the list of recordings in the **Recorder** tool.
303+
1. In the file chooser dialog that opens, select a user flow JSON file, and then click the **Open** button. The user flow is imported, and appears in the list of recordings in the **Recorder** tool.
283304

284305

285306
<!-- ====================================================================== -->
286307
## Export a user flow for test automation
287308

288-
To generate test scripts and run them automatically with a test automation framework, export your user flows as test script files.
309+
To generate a test script and run it automatically with a test automation framework, export a user flow as a `.js` test script file, as follows:
289310

290-
You can export user flows as test scripts in the following formats:
311+
1. When viewing the steps of a user flow, in the **Recorder** tool toolbar, click the **Export** (![The Export button](./index-images/export-icon.png)) button, and then select an export format:
291312

292-
| Test automation framework | Description |
293-
|:--- |:--- |
294-
| `@puppeteer/replay` | Export the user flow as a test script for the **Replay** library. To learn more, see the [Replay repo on GitHub](https://github.com/puppeteer/replay). |
295-
| Puppeteer | Export the user flow as a test script for the Puppeteer test automation framework. To learn more, see [Puppeteer](https://pptr.dev/). |
296-
| Puppeteer (including Lighthouse analysis) | Export the user flow as a test script for the Puppeteer test automation framework, and include a Lighthouse analysis of the performance of the website. |
297-
298-
To export a user flow as a test script file:
313+
![The Export button dropdown menu and the various test automation formats](./index-images/export-for-test.png)
299314

300-
1. When viewing the steps of a user flow, click the **Export** (![The Export button](./index-images/export-icon.png)) button in the **Recorder** tool toolbar, and then select the format you want to export the user flow as:
315+
| Export format | Test automation framework |
316+
|:--- |:--- |
317+
| `@puppeteer/replay` | Exports the user flow as a test script for the **Replay** library. See the [puppeteer / replay](https://github.com/puppeteer/replay) repo. |
318+
| Puppeteer | Exports the user flow as a test script for the Puppeteer test automation framework. See [Puppeteer](https://pptr.dev). |
319+
| Puppeteer (including Lighthouse analysis) | Exports the user flow as a test script for the Puppeteer test automation framework, and includes a Lighthouse analysis of the performance of the website. |
301320

302-
![The Export button dropdown menu and the various test automation formats](./index-images/export-for-test.png)
321+
The **Save As** dialog opens.
303322

304-
1. Choose a location to save the file on your computer. The file is saved with the name of the user flow, and the extension `.js`.
323+
1. Select a location in which to save the file. The file is saved with the name of the user flow, and the extension `.js`.

0 commit comments

Comments
 (0)