@designcrowd/fe-shared-lib 1.6.10-voiceText-1 → 1.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +0 -35
- package/dist/css/tailwind-brandCrowd.css +6 -109
- package/dist/css/tailwind-brandPage.css +6 -105
- package/dist/css/tailwind-crazyDomains.css +6 -109
- package/dist/css/tailwind-designCom.css +6 -109
- package/dist/css/tailwind-designCrowd.css +6 -109
- package/index.js +0 -2
- package/package.json +1 -3
- package/public/css/tailwind-brandCrowd.css +6 -48
- package/public/css/tailwind-brandPage.css +6 -36
- package/public/css/tailwind-crazyDomains.css +6 -48
- package/public/css/tailwind-designCom.css +6 -48
- package/public/css/tailwind-designCrowd.css +6 -48
- package/src/atoms/components/Dropdown/Dropdown.vue +7 -1
- package/src/atoms/components/Icon/Icon.vue +0 -2
- package/.claude/settings.local.json +0 -59
- package/.claude/skills/playwright-cli/SKILL.md +0 -278
- package/.claude/skills/playwright-cli/references/request-mocking.md +0 -87
- package/.claude/skills/playwright-cli/references/running-code.md +0 -232
- package/.claude/skills/playwright-cli/references/session-management.md +0 -169
- package/.claude/skills/playwright-cli/references/storage-state.md +0 -275
- package/.claude/skills/playwright-cli/references/test-generation.md +0 -88
- package/.claude/skills/playwright-cli/references/tracing.md +0 -139
- package/.claude/skills/playwright-cli/references/video-recording.md +0 -43
- package/.playwright-cli/page-2026-04-13T02-23-08-374Z.yml +0 -68
- package/.playwright-cli/page-2026-04-13T02-23-13-730Z.yml +0 -421
- package/.storybook-static/assets/Auth-DT64t5h-.css +0 -1
- package/.storybook-static/assets/Auth.stories-C6eXcTSu.js +0 -490
- package/.storybook-static/assets/AuthCrazyDomains.stories-DGvEoWCa.js +0 -73
- package/.storybook-static/assets/Button-5UzSGUF6.css +0 -1
- package/.storybook-static/assets/Button-DKdQT6Fq.js +0 -1
- package/.storybook-static/assets/ButtonGroup-DDPXuhxR.css +0 -1
- package/.storybook-static/assets/ButtonGroup.stories-DlrYMRSk.js +0 -504
- package/.storybook-static/assets/ButtonPrimary-Bu6bXb_c.css +0 -1
- package/.storybook-static/assets/ButtonPrimary-BvWW6Duz.js +0 -1
- package/.storybook-static/assets/Buttons.stories-CKmd6hkZ.js +0 -761
- package/.storybook-static/assets/ButtonsCrazyDomains.stories-DdEuOUrn.js +0 -199
- package/.storybook-static/assets/Checkbox.mixin-DkHpdvGa.js +0 -1
- package/.storybook-static/assets/Checkbox.stories-DPBUC2Mx.js +0 -246
- package/.storybook-static/assets/Checktile.stories-ByaFwplD.js +0 -88
- package/.storybook-static/assets/CollapsiblePanel.stories-Y6q3gP9j.js +0 -56
- package/.storybook-static/assets/ColorPicker.stories-DdxPUB_R.js +0 -73
- package/.storybook-static/assets/CopyToClipboardText.stories-J9qndWxd.js +0 -32
- package/.storybook-static/assets/Dropdown.stories-1zKPATii.js +0 -159
- package/.storybook-static/assets/DropdownItem-BV-BdThU.css +0 -1
- package/.storybook-static/assets/DropdownItem-DA6TdpDb.js +0 -1
- package/.storybook-static/assets/FormControl.mixin-DcEBwrV3.js +0 -1
- package/.storybook-static/assets/HashRouteModal.stories-BGxvqE22.js +0 -60
- package/.storybook-static/assets/HelloBar-CYEZR2kQ.js +0 -1
- package/.storybook-static/assets/HelloBar.stories-597Kxj0W.js +0 -342
- package/.storybook-static/assets/Icon-C17LFvsP.js +0 -145
- package/.storybook-static/assets/Icon.stories-B9iAmcTU.js +0 -151
- package/.storybook-static/assets/Icon.stories-CR5vT9H7.js +0 -791
- package/.storybook-static/assets/Loader-BWGoT_xC.js +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours-CExzox1Z.js +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours-CeAaMKke.css +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours.stories-kuxAH8B8.js +0 -36
- package/.storybook-static/assets/Masonry-C2MNiGg0.css +0 -1
- package/.storybook-static/assets/Masonry.stories-CTXJLQ_i.js +0 -71
- package/.storybook-static/assets/Modal-CGwEIF5R.css +0 -1
- package/.storybook-static/assets/Modal-CydTNprT.js +0 -1
- package/.storybook-static/assets/Modal.stories-DZiG5NGM.js +0 -345
- package/.storybook-static/assets/Notice.stories-ChOj8CWm.js +0 -222
- package/.storybook-static/assets/NumberStepper-Blffv09R.css +0 -1
- package/.storybook-static/assets/NumberStepper.stories-CVbKJ_oJ.js +0 -64
- package/.storybook-static/assets/PaymentConfigList-BpUMV6cp.css +0 -1
- package/.storybook-static/assets/PaymentConfigList.stories-DUD7OZBS.js +0 -130
- package/.storybook-static/assets/Picture-B8m1I9xN.js +0 -1
- package/.storybook-static/assets/Picture.stories-MMzybhJ6.js +0 -119
- package/.storybook-static/assets/Pill-DLXZ_TL8.js +0 -1
- package/.storybook-static/assets/Pill.stories-DCP7szJm.js +0 -18
- package/.storybook-static/assets/PillBar-os4mJV3M.css +0 -1
- package/.storybook-static/assets/PillBar.stories-Bry-zQ6f.js +0 -41
- package/.storybook-static/assets/Price-C4GZbDSa.js +0 -1
- package/.storybook-static/assets/Price.stories-CMHly9V0.js +0 -337
- package/.storybook-static/assets/PromoCard.stories-xsbFtADE.js +0 -299
- package/.storybook-static/assets/PublishBrandPageModal-Q9-mNG1q.css +0 -1
- package/.storybook-static/assets/PublishBrandPageModal.stories-C9XzW_1m.js +0 -324
- package/.storybook-static/assets/SearchBar.stories-DaIneOSz.js +0 -12
- package/.storybook-static/assets/Select-DnioWQmi.css +0 -1
- package/.storybook-static/assets/Select.stories-BmGYB4pw.js +0 -108
- package/.storybook-static/assets/SellDomainNameList.fixtures-LC6fjr_b.js +0 -1
- package/.storybook-static/assets/SellDomainNameListModal-DH6khE10.css +0 -1
- package/.storybook-static/assets/SellDomainNameListModal-ymtVclFP.js +0 -1
- package/.storybook-static/assets/SellDomainNameListModal.stories-DvGvylgx.js +0 -71
- package/.storybook-static/assets/SellDomainNameListSearchResult-Cpxq0jDA.css +0 -1
- package/.storybook-static/assets/SellDomainNameListSearchResult-D-1CrQyf.js +0 -1
- package/.storybook-static/assets/SellDomainNameSearchWithResults-bX--zu97.js +0 -1
- package/.storybook-static/assets/SellDomainNameSearchWithResults.stories-DRUJjSdH.js +0 -37
- package/.storybook-static/assets/SellDomainNameWidget.stories-CC3LX10s.js +0 -36
- package/.storybook-static/assets/SignIn-CPjf8_2O.css +0 -1
- package/.storybook-static/assets/SignIn-DI0DSDFe.js +0 -1
- package/.storybook-static/assets/Slider-Cog2FFdj.css +0 -1
- package/.storybook-static/assets/Slider.stories-B2KGwnJy.js +0 -141
- package/.storybook-static/assets/SparkleIcon.stories-Dk904hVE.js +0 -547
- package/.storybook-static/assets/StarRating-BtKh7pzm.css +0 -1
- package/.storybook-static/assets/StarRating.stories-d2mgOuo2.js +0 -45
- package/.storybook-static/assets/TabMenu.stories-Cg2yenqj.js +0 -47
- package/.storybook-static/assets/TextCopyField-B66NKTk_.js +0 -1
- package/.storybook-static/assets/TextCopyField.stories-B4_ZlfLU.js +0 -47
- package/.storybook-static/assets/TextInput-CMoUjT_5.js +0 -1
- package/.storybook-static/assets/TextInput.stories-oyyxxf3j.js +0 -233
- package/.storybook-static/assets/Textarea.stories-BvhZR6K2.js +0 -207
- package/.storybook-static/assets/Toggle.stories-yT5-rL2k.js +0 -161
- package/.storybook-static/assets/Tooltip-DyXIgFQH.css +0 -1
- package/.storybook-static/assets/Tooltip-ZukyujG5.js +0 -1
- package/.storybook-static/assets/Tooltip.stories-sJFylRS_.js +0 -953
- package/.storybook-static/assets/UploadYourLogoApplication-Dmw8QcH3.css +0 -1
- package/.storybook-static/assets/UploadYourLogoApplication.stories-C9AvzHO_.js +0 -186
- package/.storybook-static/assets/UploadYourLogoDropzone-B1ffcicv.js +0 -24
- package/.storybook-static/assets/UploadYourLogoDropzone-DQqACf-e.css +0 -1
- package/.storybook-static/assets/UploadYourLogoDropzone.stories-D1Dt2ord.js +0 -55
- package/.storybook-static/assets/UploadedLogoSearchResultCard.stories-D8oF1Yrx.js +0 -79
- package/.storybook-static/assets/WebsiteContextualUpgradeModal-8u1zOZrW.css +0 -1
- package/.storybook-static/assets/WebsiteContextualUpgradeModal.stories-mtcvWOAg.js +0 -211
- package/.storybook-static/assets/_commonjsHelpers-CE1G-McA.js +0 -1
- package/.storybook-static/assets/_plugin-vue_export-helper-DlAUqK2U.js +0 -1
- package/.storybook-static/assets/api-lSJGRrF2.js +0 -1
- package/.storybook-static/assets/axe-DrS73Vi2.js +0 -20
- package/.storybook-static/assets/brand-crowd-api.client-D45NKshX.js +0 -1
- package/.storybook-static/assets/bundled-translations-BoWhEDU_.js +0 -1
- package/.storybook-static/assets/bundled-translations.de-DE-C4lqla4O.js +0 -1
- package/.storybook-static/assets/bundled-translations.es-ES-BxMIllUH.js +0 -1
- package/.storybook-static/assets/bundled-translations.fr-CA-MxZpyz0w.js +0 -1
- package/.storybook-static/assets/bundled-translations.fr-FR-N7UPCZVr.js +0 -1
- package/.storybook-static/assets/bundled-translations.pt-BR-C8tscYuG.js +0 -1
- package/.storybook-static/assets/bundled-translations.pt-PT-Dszj5Xfa.js +0 -1
- package/.storybook-static/assets/carousel-BelyIYOK.css +0 -1
- package/.storybook-static/assets/carousel.stories-CJw3-Iy6.js +0 -668
- package/.storybook-static/assets/event-constants-CMO9VQVu.js +0 -1
- package/.storybook-static/assets/iframe-B3A6OXQU.js +0 -1104
- package/.storybook-static/assets/index-B-eiLVzF.js +0 -7
- package/.storybook-static/assets/index-QquxUozE.js +0 -6
- package/.storybook-static/assets/matchers-5TDFFDYO-HJu_DfWo.js +0 -14
- package/.storybook-static/assets/mediaQueryMixin-CISNqd93.js +0 -1
- package/.storybook-static/assets/preload-helper-PPVm8Dsz.js +0 -1
- package/.storybook-static/assets/tracking-ATsLLehC.js +0 -1
- package/.storybook-static/css/tailwind-brandCrowd.css +0 -2508
- package/.storybook-static/css/tailwind-brandPage.css +0 -2188
- package/.storybook-static/css/tailwind-crazyDomains.css +0 -2508
- package/.storybook-static/css/tailwind-designCom.css +0 -2508
- package/.storybook-static/css/tailwind-designCrowd.css +0 -2508
- package/.storybook-static/favicon-wrapper.svg +0 -46
- package/.storybook-static/favicon.svg +0 -1
- package/.storybook-static/iframe.html +0 -713
- package/.storybook-static/index.html +0 -148
- package/.storybook-static/index.json +0 -1
- package/.storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/.storybook-static/nunito-sans-bold.woff2 +0 -0
- package/.storybook-static/nunito-sans-italic.woff2 +0 -0
- package/.storybook-static/nunito-sans-regular.woff2 +0 -0
- package/.storybook-static/project.json +0 -1
- package/.storybook-static/sb-addons/a11y-1/manager-bundle.js +0 -57
- package/.storybook-static/sb-addons/links-2/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -628
- package/.storybook-static/sb-addons/themes-3/manager-bundle.js +0 -3
- package/.storybook-static/sb-common-assets/favicon-wrapper.svg +0 -46
- package/.storybook-static/sb-common-assets/favicon.svg +0 -1
- package/.storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/.storybook-static/sb-manager/globals-runtime.js +0 -77935
- package/.storybook-static/sb-manager/globals.js +0 -24
- package/.storybook-static/sb-manager/manager-stores.js +0 -23
- package/.storybook-static/sb-manager/runtime.js +0 -20404
- package/.storybook-static/vite-inject-mocker-entry.js +0 -2
- package/src/atoms/components/Icon/icons/microphone.vue +0 -5
- package/src/atoms/components/VoiceToTextButton/VoiceToTextButton.stories.js +0 -105
- package/src/atoms/components/VoiceToTextButton/VoiceToTextButton.vue +0 -121
- package/src/useVoiceToText.js +0 -174
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
# Storage Management
|
|
2
|
-
|
|
3
|
-
Manage cookies, localStorage, sessionStorage, and browser storage state.
|
|
4
|
-
|
|
5
|
-
## Storage State
|
|
6
|
-
|
|
7
|
-
Save and restore complete browser state including cookies and storage.
|
|
8
|
-
|
|
9
|
-
### Save Storage State
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
# Save to auto-generated filename (storage-state-{timestamp}.json)
|
|
13
|
-
playwright-cli state-save
|
|
14
|
-
|
|
15
|
-
# Save to specific filename
|
|
16
|
-
playwright-cli state-save my-auth-state.json
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Restore Storage State
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
# Load storage state from file
|
|
23
|
-
playwright-cli state-load my-auth-state.json
|
|
24
|
-
|
|
25
|
-
# Reload page to apply cookies
|
|
26
|
-
playwright-cli open https://example.com
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Storage State File Format
|
|
30
|
-
|
|
31
|
-
The saved file contains:
|
|
32
|
-
|
|
33
|
-
```json
|
|
34
|
-
{
|
|
35
|
-
"cookies": [
|
|
36
|
-
{
|
|
37
|
-
"name": "session_id",
|
|
38
|
-
"value": "abc123",
|
|
39
|
-
"domain": "example.com",
|
|
40
|
-
"path": "/",
|
|
41
|
-
"expires": 1735689600,
|
|
42
|
-
"httpOnly": true,
|
|
43
|
-
"secure": true,
|
|
44
|
-
"sameSite": "Lax"
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"origins": [
|
|
48
|
-
{
|
|
49
|
-
"origin": "https://example.com",
|
|
50
|
-
"localStorage": [
|
|
51
|
-
{ "name": "theme", "value": "dark" },
|
|
52
|
-
{ "name": "user_id", "value": "12345" }
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Cookies
|
|
60
|
-
|
|
61
|
-
### List All Cookies
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
playwright-cli cookie-list
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Filter Cookies by Domain
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
playwright-cli cookie-list --domain=example.com
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Filter Cookies by Path
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
playwright-cli cookie-list --path=/api
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Get Specific Cookie
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
playwright-cli cookie-get session_id
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Set a Cookie
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
# Basic cookie
|
|
89
|
-
playwright-cli cookie-set session abc123
|
|
90
|
-
|
|
91
|
-
# Cookie with options
|
|
92
|
-
playwright-cli cookie-set session abc123 --domain=example.com --path=/ --httpOnly --secure --sameSite=Lax
|
|
93
|
-
|
|
94
|
-
# Cookie with expiration (Unix timestamp)
|
|
95
|
-
playwright-cli cookie-set remember_me token123 --expires=1735689600
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Delete a Cookie
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
playwright-cli cookie-delete session_id
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Clear All Cookies
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
playwright-cli cookie-clear
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Advanced: Multiple Cookies or Custom Options
|
|
111
|
-
|
|
112
|
-
For complex scenarios like adding multiple cookies at once, use `run-code`:
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
playwright-cli run-code "async page => {
|
|
116
|
-
await page.context().addCookies([
|
|
117
|
-
{ name: 'session_id', value: 'sess_abc123', domain: 'example.com', path: '/', httpOnly: true },
|
|
118
|
-
{ name: 'preferences', value: JSON.stringify({ theme: 'dark' }), domain: 'example.com', path: '/' }
|
|
119
|
-
]);
|
|
120
|
-
}"
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Local Storage
|
|
124
|
-
|
|
125
|
-
### List All localStorage Items
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
playwright-cli localstorage-list
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Get Single Value
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
playwright-cli localstorage-get token
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Set Value
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
playwright-cli localstorage-set theme dark
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### Set JSON Value
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
playwright-cli localstorage-set user_settings '{"theme":"dark","language":"en"}'
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Delete Single Item
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
playwright-cli localstorage-delete token
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Clear All localStorage
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
playwright-cli localstorage-clear
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Advanced: Multiple Operations
|
|
162
|
-
|
|
163
|
-
For complex scenarios like setting multiple values at once, use `run-code`:
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
playwright-cli run-code "async page => {
|
|
167
|
-
await page.evaluate(() => {
|
|
168
|
-
localStorage.setItem('token', 'jwt_abc123');
|
|
169
|
-
localStorage.setItem('user_id', '12345');
|
|
170
|
-
localStorage.setItem('expires_at', Date.now() + 3600000);
|
|
171
|
-
});
|
|
172
|
-
}"
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## Session Storage
|
|
176
|
-
|
|
177
|
-
### List All sessionStorage Items
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
playwright-cli sessionstorage-list
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### Get Single Value
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
playwright-cli sessionstorage-get form_data
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Set Value
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
playwright-cli sessionstorage-set step 3
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
### Delete Single Item
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
playwright-cli sessionstorage-delete step
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
### Clear sessionStorage
|
|
202
|
-
|
|
203
|
-
```bash
|
|
204
|
-
playwright-cli sessionstorage-clear
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
## IndexedDB
|
|
208
|
-
|
|
209
|
-
### List Databases
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
playwright-cli run-code "async page => {
|
|
213
|
-
return await page.evaluate(async () => {
|
|
214
|
-
const databases = await indexedDB.databases();
|
|
215
|
-
return databases;
|
|
216
|
-
});
|
|
217
|
-
}"
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
### Delete Database
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
playwright-cli run-code "async page => {
|
|
224
|
-
await page.evaluate(() => {
|
|
225
|
-
indexedDB.deleteDatabase('myDatabase');
|
|
226
|
-
});
|
|
227
|
-
}"
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## Common Patterns
|
|
231
|
-
|
|
232
|
-
### Authentication State Reuse
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
# Step 1: Login and save state
|
|
236
|
-
playwright-cli open https://app.example.com/login
|
|
237
|
-
playwright-cli snapshot
|
|
238
|
-
playwright-cli fill e1 "user@example.com"
|
|
239
|
-
playwright-cli fill e2 "password123"
|
|
240
|
-
playwright-cli click e3
|
|
241
|
-
|
|
242
|
-
# Save the authenticated state
|
|
243
|
-
playwright-cli state-save auth.json
|
|
244
|
-
|
|
245
|
-
# Step 2: Later, restore state and skip login
|
|
246
|
-
playwright-cli state-load auth.json
|
|
247
|
-
playwright-cli open https://app.example.com/dashboard
|
|
248
|
-
# Already logged in!
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### Save and Restore Roundtrip
|
|
252
|
-
|
|
253
|
-
```bash
|
|
254
|
-
# Set up authentication state
|
|
255
|
-
playwright-cli open https://example.com
|
|
256
|
-
playwright-cli eval "() => { document.cookie = 'session=abc123'; localStorage.setItem('user', 'john'); }"
|
|
257
|
-
|
|
258
|
-
# Save state to file
|
|
259
|
-
playwright-cli state-save my-session.json
|
|
260
|
-
|
|
261
|
-
# ... later, in a new session ...
|
|
262
|
-
|
|
263
|
-
# Restore state
|
|
264
|
-
playwright-cli state-load my-session.json
|
|
265
|
-
playwright-cli open https://example.com
|
|
266
|
-
# Cookies and localStorage are restored!
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
## Security Notes
|
|
270
|
-
|
|
271
|
-
- Never commit storage state files containing auth tokens
|
|
272
|
-
- Add `*.auth-state.json` to `.gitignore`
|
|
273
|
-
- Delete state files after automation completes
|
|
274
|
-
- Use environment variables for sensitive data
|
|
275
|
-
- By default, sessions run in-memory mode which is safer for sensitive operations
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# Test Generation
|
|
2
|
-
|
|
3
|
-
Generate Playwright test code automatically as you interact with the browser.
|
|
4
|
-
|
|
5
|
-
## How It Works
|
|
6
|
-
|
|
7
|
-
Every action you perform with `playwright-cli` generates corresponding Playwright TypeScript code.
|
|
8
|
-
This code appears in the output and can be copied directly into your test files.
|
|
9
|
-
|
|
10
|
-
## Example Workflow
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
# Start a session
|
|
14
|
-
playwright-cli open https://example.com/login
|
|
15
|
-
|
|
16
|
-
# Take a snapshot to see elements
|
|
17
|
-
playwright-cli snapshot
|
|
18
|
-
# Output shows: e1 [textbox "Email"], e2 [textbox "Password"], e3 [button "Sign In"]
|
|
19
|
-
|
|
20
|
-
# Fill form fields - generates code automatically
|
|
21
|
-
playwright-cli fill e1 "user@example.com"
|
|
22
|
-
# Ran Playwright code:
|
|
23
|
-
# await page.getByRole('textbox', { name: 'Email' }).fill('user@example.com');
|
|
24
|
-
|
|
25
|
-
playwright-cli fill e2 "password123"
|
|
26
|
-
# Ran Playwright code:
|
|
27
|
-
# await page.getByRole('textbox', { name: 'Password' }).fill('password123');
|
|
28
|
-
|
|
29
|
-
playwright-cli click e3
|
|
30
|
-
# Ran Playwright code:
|
|
31
|
-
# await page.getByRole('button', { name: 'Sign In' }).click();
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Building a Test File
|
|
35
|
-
|
|
36
|
-
Collect the generated code into a Playwright test:
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
import { test, expect } from '@playwright/test';
|
|
40
|
-
|
|
41
|
-
test('login flow', async ({ page }) => {
|
|
42
|
-
// Generated code from playwright-cli session:
|
|
43
|
-
await page.goto('https://example.com/login');
|
|
44
|
-
await page.getByRole('textbox', { name: 'Email' }).fill('user@example.com');
|
|
45
|
-
await page.getByRole('textbox', { name: 'Password' }).fill('password123');
|
|
46
|
-
await page.getByRole('button', { name: 'Sign In' }).click();
|
|
47
|
-
|
|
48
|
-
// Add assertions
|
|
49
|
-
await expect(page).toHaveURL(/.*dashboard/);
|
|
50
|
-
});
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Best Practices
|
|
54
|
-
|
|
55
|
-
### 1. Use Semantic Locators
|
|
56
|
-
|
|
57
|
-
The generated code uses role-based locators when possible, which are more resilient:
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// Generated (good - semantic)
|
|
61
|
-
await page.getByRole('button', { name: 'Submit' }).click();
|
|
62
|
-
|
|
63
|
-
// Avoid (fragile - CSS selectors)
|
|
64
|
-
await page.locator('#submit-btn').click();
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### 2. Explore Before Recording
|
|
68
|
-
|
|
69
|
-
Take snapshots to understand the page structure before recording actions:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
playwright-cli open https://example.com
|
|
73
|
-
playwright-cli snapshot
|
|
74
|
-
# Review the element structure
|
|
75
|
-
playwright-cli click e5
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### 3. Add Assertions Manually
|
|
79
|
-
|
|
80
|
-
Generated code captures actions but not assertions. Add expectations in your test:
|
|
81
|
-
|
|
82
|
-
```typescript
|
|
83
|
-
// Generated action
|
|
84
|
-
await page.getByRole('button', { name: 'Submit' }).click();
|
|
85
|
-
|
|
86
|
-
// Manual assertion
|
|
87
|
-
await expect(page.getByText('Success')).toBeVisible();
|
|
88
|
-
```
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
# Tracing
|
|
2
|
-
|
|
3
|
-
Capture detailed execution traces for debugging and analysis. Traces include DOM snapshots, screenshots, network activity, and console logs.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Start trace recording
|
|
9
|
-
playwright-cli tracing-start
|
|
10
|
-
|
|
11
|
-
# Perform actions
|
|
12
|
-
playwright-cli open https://example.com
|
|
13
|
-
playwright-cli click e1
|
|
14
|
-
playwright-cli fill e2 "test"
|
|
15
|
-
|
|
16
|
-
# Stop trace recording
|
|
17
|
-
playwright-cli tracing-stop
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Trace Output Files
|
|
21
|
-
|
|
22
|
-
When you start tracing, Playwright creates a `traces/` directory with several files:
|
|
23
|
-
|
|
24
|
-
### `trace-{timestamp}.trace`
|
|
25
|
-
|
|
26
|
-
**Action log** - The main trace file containing:
|
|
27
|
-
- Every action performed (clicks, fills, navigations)
|
|
28
|
-
- DOM snapshots before and after each action
|
|
29
|
-
- Screenshots at each step
|
|
30
|
-
- Timing information
|
|
31
|
-
- Console messages
|
|
32
|
-
- Source locations
|
|
33
|
-
|
|
34
|
-
### `trace-{timestamp}.network`
|
|
35
|
-
|
|
36
|
-
**Network log** - Complete network activity:
|
|
37
|
-
- All HTTP requests and responses
|
|
38
|
-
- Request headers and bodies
|
|
39
|
-
- Response headers and bodies
|
|
40
|
-
- Timing (DNS, connect, TLS, TTFB, download)
|
|
41
|
-
- Resource sizes
|
|
42
|
-
- Failed requests and errors
|
|
43
|
-
|
|
44
|
-
### `resources/`
|
|
45
|
-
|
|
46
|
-
**Resources directory** - Cached resources:
|
|
47
|
-
- Images, fonts, stylesheets, scripts
|
|
48
|
-
- Response bodies for replay
|
|
49
|
-
- Assets needed to reconstruct page state
|
|
50
|
-
|
|
51
|
-
## What Traces Capture
|
|
52
|
-
|
|
53
|
-
| Category | Details |
|
|
54
|
-
|----------|---------|
|
|
55
|
-
| **Actions** | Clicks, fills, hovers, keyboard input, navigations |
|
|
56
|
-
| **DOM** | Full DOM snapshot before/after each action |
|
|
57
|
-
| **Screenshots** | Visual state at each step |
|
|
58
|
-
| **Network** | All requests, responses, headers, bodies, timing |
|
|
59
|
-
| **Console** | All console.log, warn, error messages |
|
|
60
|
-
| **Timing** | Precise timing for each operation |
|
|
61
|
-
|
|
62
|
-
## Use Cases
|
|
63
|
-
|
|
64
|
-
### Debugging Failed Actions
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
playwright-cli tracing-start
|
|
68
|
-
playwright-cli open https://app.example.com
|
|
69
|
-
|
|
70
|
-
# This click fails - why?
|
|
71
|
-
playwright-cli click e5
|
|
72
|
-
|
|
73
|
-
playwright-cli tracing-stop
|
|
74
|
-
# Open trace to see DOM state when click was attempted
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Analyzing Performance
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
playwright-cli tracing-start
|
|
81
|
-
playwright-cli open https://slow-site.com
|
|
82
|
-
playwright-cli tracing-stop
|
|
83
|
-
|
|
84
|
-
# View network waterfall to identify slow resources
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Capturing Evidence
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
# Record a complete user flow for documentation
|
|
91
|
-
playwright-cli tracing-start
|
|
92
|
-
|
|
93
|
-
playwright-cli open https://app.example.com/checkout
|
|
94
|
-
playwright-cli fill e1 "4111111111111111"
|
|
95
|
-
playwright-cli fill e2 "12/25"
|
|
96
|
-
playwright-cli fill e3 "123"
|
|
97
|
-
playwright-cli click e4
|
|
98
|
-
|
|
99
|
-
playwright-cli tracing-stop
|
|
100
|
-
# Trace shows exact sequence of events
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Trace vs Video vs Screenshot
|
|
104
|
-
|
|
105
|
-
| Feature | Trace | Video | Screenshot |
|
|
106
|
-
|---------|-------|-------|------------|
|
|
107
|
-
| **Format** | .trace file | .webm video | .png/.jpeg image |
|
|
108
|
-
| **DOM inspection** | Yes | No | No |
|
|
109
|
-
| **Network details** | Yes | No | No |
|
|
110
|
-
| **Step-by-step replay** | Yes | Continuous | Single frame |
|
|
111
|
-
| **File size** | Medium | Large | Small |
|
|
112
|
-
| **Best for** | Debugging | Demos | Quick capture |
|
|
113
|
-
|
|
114
|
-
## Best Practices
|
|
115
|
-
|
|
116
|
-
### 1. Start Tracing Before the Problem
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
# Trace the entire flow, not just the failing step
|
|
120
|
-
playwright-cli tracing-start
|
|
121
|
-
playwright-cli open https://example.com
|
|
122
|
-
# ... all steps leading to the issue ...
|
|
123
|
-
playwright-cli tracing-stop
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### 2. Clean Up Old Traces
|
|
127
|
-
|
|
128
|
-
Traces can consume significant disk space:
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
# Remove traces older than 7 days
|
|
132
|
-
find .playwright-cli/traces -mtime +7 -delete
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Limitations
|
|
136
|
-
|
|
137
|
-
- Traces add overhead to automation
|
|
138
|
-
- Large traces can consume significant disk space
|
|
139
|
-
- Some dynamic content may not replay perfectly
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Video Recording
|
|
2
|
-
|
|
3
|
-
Capture browser automation sessions as video for debugging, documentation, or verification. Produces WebM (VP8/VP9 codec).
|
|
4
|
-
|
|
5
|
-
## Basic Recording
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Start recording
|
|
9
|
-
playwright-cli video-start
|
|
10
|
-
|
|
11
|
-
# Perform actions
|
|
12
|
-
playwright-cli open https://example.com
|
|
13
|
-
playwright-cli snapshot
|
|
14
|
-
playwright-cli click e1
|
|
15
|
-
playwright-cli fill e2 "test input"
|
|
16
|
-
|
|
17
|
-
# Stop and save
|
|
18
|
-
playwright-cli video-stop demo.webm
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Best Practices
|
|
22
|
-
|
|
23
|
-
### 1. Use Descriptive Filenames
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
# Include context in filename
|
|
27
|
-
playwright-cli video-stop recordings/login-flow-2024-01-15.webm
|
|
28
|
-
playwright-cli video-stop recordings/checkout-test-run-42.webm
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Tracing vs Video
|
|
32
|
-
|
|
33
|
-
| Feature | Video | Tracing |
|
|
34
|
-
|---------|-------|---------|
|
|
35
|
-
| Output | WebM file | Trace file (viewable in Trace Viewer) |
|
|
36
|
-
| Shows | Visual recording | DOM snapshots, network, console, actions |
|
|
37
|
-
| Use case | Demos, documentation | Debugging, analysis |
|
|
38
|
-
| Size | Larger | Smaller |
|
|
39
|
-
|
|
40
|
-
## Limitations
|
|
41
|
-
|
|
42
|
-
- Recording adds slight overhead to automation
|
|
43
|
-
- Large recordings can consume significant disk space
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
- generic [ref=e3]:
|
|
2
|
-
- navigation "Global" [ref=e6]:
|
|
3
|
-
- generic [ref=e10]:
|
|
4
|
-
- generic [ref=e11]:
|
|
5
|
-
- link "Skip to canvas" [ref=e12] [cursor=pointer]:
|
|
6
|
-
- /url: "#storybook-preview-wrapper"
|
|
7
|
-
- link "Storybook" [ref=e14] [cursor=pointer]:
|
|
8
|
-
- /url: ./
|
|
9
|
-
- img "Storybook" [ref=e15]
|
|
10
|
-
- button "Shortcuts" [ref=e21] [cursor=pointer]:
|
|
11
|
-
- img [ref=e22]
|
|
12
|
-
- generic [ref=e25]: Search for components
|
|
13
|
-
- combobox "Search for components" [ref=e27]:
|
|
14
|
-
- generic:
|
|
15
|
-
- img
|
|
16
|
-
- searchbox "Search for components" [ref=e28]
|
|
17
|
-
- code: ⌃ K
|
|
18
|
-
- main [ref=e52]:
|
|
19
|
-
- generic [ref=e54]:
|
|
20
|
-
- generic [ref=e55]:
|
|
21
|
-
- button "Remount component" [ref=e56] [cursor=pointer]:
|
|
22
|
-
- img [ref=e57]
|
|
23
|
-
- button "Zoom in" [ref=e59] [cursor=pointer]:
|
|
24
|
-
- img [ref=e60]
|
|
25
|
-
- button "Zoom out" [ref=e63] [cursor=pointer]:
|
|
26
|
-
- img [ref=e64]
|
|
27
|
-
- button "Reset zoom" [ref=e67] [cursor=pointer]:
|
|
28
|
-
- img [ref=e68]
|
|
29
|
-
- button "Enable measure" [ref=e71] [cursor=pointer]:
|
|
30
|
-
- img [ref=e72]
|
|
31
|
-
- button "Apply outlines to the preview" [ref=e75] [cursor=pointer]:
|
|
32
|
-
- img [ref=e76]
|
|
33
|
-
- button "Change the size of the preview" [ref=e79] [cursor=pointer]:
|
|
34
|
-
- img [ref=e80]
|
|
35
|
-
- button "Vision simulator" [ref=e85] [cursor=pointer]:
|
|
36
|
-
- img [ref=e86]
|
|
37
|
-
- generic:
|
|
38
|
-
- img
|
|
39
|
-
- generic [ref=e90]:
|
|
40
|
-
- button "Go full screen" [ref=e91] [cursor=pointer]:
|
|
41
|
-
- img [ref=e92]
|
|
42
|
-
- link "Open canvas in new tab" [ref=e94] [cursor=pointer]:
|
|
43
|
-
- /url: iframe.html?id=components-voicetotextbutton--prompt-input-demo
|
|
44
|
-
- img [ref=e95]
|
|
45
|
-
- button "Copy canvas link" [ref=e98] [cursor=pointer]:
|
|
46
|
-
- img [ref=e99]
|
|
47
|
-
- generic [ref=e103]:
|
|
48
|
-
- progressbar "Content is loading..." [ref=e105]
|
|
49
|
-
- generic [ref=e106]:
|
|
50
|
-
- link "Skip to sidebar" [ref=e107] [cursor=pointer]:
|
|
51
|
-
- /url: "#components-voicetotextbutton--prompt-input-demo"
|
|
52
|
-
- iframe [ref=e108]:
|
|
53
|
-
|
|
54
|
-
- generic [ref=e113]:
|
|
55
|
-
- tablist [ref=e115]:
|
|
56
|
-
- tab "Controls" [ref=e116] [cursor=pointer]:
|
|
57
|
-
- generic [ref=e118]: Controls
|
|
58
|
-
- tab "Actions" [ref=e119] [cursor=pointer]:
|
|
59
|
-
- generic [ref=e121]: Actions
|
|
60
|
-
- tab "Interactions" [ref=e122] [cursor=pointer]:
|
|
61
|
-
- generic [ref=e124]: Interactions
|
|
62
|
-
- tab "Accessibility" [ref=e125] [cursor=pointer]:
|
|
63
|
-
- generic [ref=e127]: Accessibility
|
|
64
|
-
- generic [ref=e130]:
|
|
65
|
-
- button "Change addon orientation [alt D]" [ref=e131] [cursor=pointer]:
|
|
66
|
-
- img [ref=e132]
|
|
67
|
-
- button "Hide addons [alt A]" [ref=e135] [cursor=pointer]:
|
|
68
|
-
- img [ref=e136]
|