-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswag_labs.side
432 lines (432 loc) · 16.7 KB
/
swag_labs.side
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
{
"id": "83965261-a343-4046-9447-e9486383b4f4",
"version": "2.0",
"name": "Belajar Testing",
"url": "https://www.saucedemo.com",
"tests": [{
"id": "3a5e796c-30b7-4ec3-b8f8-739c176e34f0",
"name": "01 Login",
"commands": [{
"id": "201e2d9c-08b9-4a5d-8c58-599794339c9c",
"comment": "",
"command": "open",
"target": "/",
"targets": [],
"value": ""
}, {
"id": "8b5a38df-21ed-4727-9210-a43aad06f328",
"comment": "",
"command": "setWindowSize",
"target": "940x699",
"targets": [],
"value": ""
}, {
"id": "f351991a-6a95-44a3-91ea-848322ae775f",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"username\"]",
"targets": [
["css=*[data-test=\"username\"]", "css:data-attr"],
["id=user-name", "id"],
["name=user-name", "name"],
["css=#user-name", "css:finder"],
["xpath=//input[@id='user-name']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div/input", "xpath:idRelative"],
["xpath=//input", "xpath:position"]
],
"value": ""
}, {
"id": "b11f1edf-d2b6-4122-bcba-754004d2dea0",
"comment": "",
"command": "type",
"target": "css=*[data-test=\"username\"]",
"targets": [
["css=*[data-test=\"username\"]", "css:data-attr"],
["id=user-name", "id"],
["name=user-name", "name"],
["css=#user-name", "css:finder"],
["xpath=//input[@id='user-name']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div/input", "xpath:idRelative"],
["xpath=//input", "xpath:position"]
],
"value": "standard_user"
}, {
"id": "fa5bfb87-11ea-47e6-9b10-ce3c00a013ac",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"password\"]",
"targets": [
["css=*[data-test=\"password\"]", "css:data-attr"],
["id=password", "id"],
["name=password", "name"],
["css=#password", "css:finder"],
["xpath=//input[@id='password']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div[2]/input", "xpath:idRelative"],
["xpath=//div[2]/input", "xpath:position"]
],
"value": ""
}, {
"id": "f76e3957-dccf-4399-b4a1-c6b23a95ae50",
"comment": "",
"command": "type",
"target": "css=*[data-test=\"password\"]",
"targets": [
["css=*[data-test=\"password\"]", "css:data-attr"],
["id=password", "id"],
["name=password", "name"],
["css=#password", "css:finder"],
["xpath=//input[@id='password']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div[2]/input", "xpath:idRelative"],
["xpath=//div[2]/input", "xpath:position"]
],
"value": "secret_sauce"
}, {
"id": "a60e59de-b5d4-4d44-a062-20fe51a16cca",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"login-button\"]",
"targets": [
["css=*[data-test=\"login-button\"]", "css:data-attr"],
["id=login-button", "id"],
["name=login-button", "name"],
["css=#login-button", "css:finder"],
["xpath=//input[@id='login-button']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/input", "xpath:idRelative"],
["xpath=//form/input", "xpath:position"]
],
"value": ""
}, {
"id": "92b3ff75-8eb4-4af1-a308-75b2b2f2d7b4",
"comment": "",
"command": "assertText",
"target": "css=.app_logo",
"targets": [
["css=.app_logo", "css:finder"],
["xpath=//div[@id='header_container']/div/div[2]/div", "xpath:idRelative"],
["xpath=//body/div/div/div/div/div/div[2]/div", "xpath:position"]
],
"value": "Swag Labs"
}]
}, {
"id": "3d2c968f-8f21-4cb6-bde6-d8235bf8923e",
"name": "02 Add to Chart",
"commands": [{
"id": "71c1e514-5cfa-4699-8081-5cc1c9cde270",
"comment": "",
"command": "open",
"target": "/",
"targets": [],
"value": ""
}, {
"id": "ccd7f014-9cd4-45b9-915f-65e1eef19076",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"username\"]",
"targets": [
["css=*[data-test=\"username\"]", "css:data-attr"],
["id=user-name", "id"],
["name=user-name", "name"],
["css=#user-name", "css:finder"],
["xpath=//input[@id='user-name']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div/input", "xpath:idRelative"],
["xpath=//input", "xpath:position"]
],
"value": ""
}, {
"id": "80d4b399-45ce-45b1-a6e5-d471b17ab32e",
"comment": "",
"command": "type",
"target": "css=*[data-test=\"username\"]",
"targets": [
["css=*[data-test=\"username\"]", "css:data-attr"],
["id=user-name", "id"],
["name=user-name", "name"],
["css=#user-name", "css:finder"],
["xpath=//input[@id='user-name']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div/input", "xpath:idRelative"],
["xpath=//input", "xpath:position"]
],
"value": "standard_user"
}, {
"id": "16f9cf19-0b28-4b6b-aca4-7509e2ba2885",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"password\"]",
"targets": [
["css=*[data-test=\"password\"]", "css:data-attr"],
["id=password", "id"],
["name=password", "name"],
["css=#password", "css:finder"],
["xpath=//input[@id='password']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div[2]/input", "xpath:idRelative"],
["xpath=//div[2]/input", "xpath:position"]
],
"value": ""
}, {
"id": "216f383b-92d2-4c80-8f4a-ceaa84bfe127",
"comment": "",
"command": "type",
"target": "css=*[data-test=\"password\"]",
"targets": [
["css=*[data-test=\"password\"]", "css:data-attr"],
["id=password", "id"],
["name=password", "name"],
["css=#password", "css:finder"],
["xpath=//input[@id='password']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div[2]/input", "xpath:idRelative"],
["xpath=//div[2]/input", "xpath:position"]
],
"value": "secret_sauce"
}, {
"id": "075751c7-d1e7-45e8-8fbc-74a45dd76033",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"login-button\"]",
"targets": [
["css=*[data-test=\"login-button\"]", "css:data-attr"],
["id=login-button", "id"],
["name=login-button", "name"],
["css=#login-button", "css:finder"],
["xpath=//input[@id='login-button']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/input", "xpath:idRelative"],
["xpath=//form/input", "xpath:position"]
],
"value": ""
}, {
"id": "ef0a3196-f18e-4e86-a979-ce4a5bf807fe",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"add-to-cart-sauce-labs-backpack\"]",
"targets": [
["css=*[data-test=\"add-to-cart-sauce-labs-backpack\"]", "css:data-attr"],
["id=add-to-cart-sauce-labs-backpack", "id"],
["name=add-to-cart-sauce-labs-backpack", "name"],
["css=#add-to-cart-sauce-labs-backpack", "css:finder"],
["xpath=//button[@id='add-to-cart-sauce-labs-backpack']", "xpath:attributes"],
["xpath=//div[@id='inventory_container']/div/div/div[2]/div[2]/button", "xpath:idRelative"],
["xpath=//div[2]/button", "xpath:position"],
["xpath=//button[contains(.,'Add to cart')]", "xpath:innerText"]
],
"value": ""
}, {
"id": "f2f1f484-ff2a-4acf-9530-3732d2da12e6",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"add-to-cart-sauce-labs-bike-light\"]",
"targets": [
["css=*[data-test=\"add-to-cart-sauce-labs-bike-light\"]", "css:data-attr"],
["id=add-to-cart-sauce-labs-bike-light", "id"],
["name=add-to-cart-sauce-labs-bike-light", "name"],
["css=#add-to-cart-sauce-labs-bike-light", "css:finder"],
["xpath=//button[@id='add-to-cart-sauce-labs-bike-light']", "xpath:attributes"],
["xpath=//div[@id='inventory_container']/div/div[2]/div[2]/div[2]/button", "xpath:idRelative"],
["xpath=//div[2]/div[2]/div[2]/button", "xpath:position"],
["xpath=//button[contains(.,'Add to cart')]", "xpath:innerText"]
],
"value": ""
}, {
"id": "4dfe040e-8d77-4ecf-a25a-dfa6399f2e59",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"add-to-cart-test.allthethings()-t-shirt-(red)\"]",
"targets": [
["css=*[data-test=\"add-to-cart-test.allthethings()-t-shirt-(red)\"]", "css:data-attr"],
["id=add-to-cart-test.allthethings()-t-shirt-(red)", "id"],
["name=add-to-cart-test.allthethings()-t-shirt-(red)", "name"],
["css=#add-to-cart-test\\.allthethings\\(\\)-t-shirt-\\(red\\)", "css:finder"],
["xpath=//button[@id='add-to-cart-test.allthethings()-t-shirt-(red)']", "xpath:attributes"],
["xpath=//div[@id='inventory_container']/div/div[6]/div[2]/div[2]/button", "xpath:idRelative"],
["xpath=//div[6]/div[2]/div[2]/button", "xpath:position"]
],
"value": ""
}, {
"id": "f40d9b92-7f9e-4541-94ef-36fae91776f8",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"shopping-cart-badge\"]",
"targets": [
["css=*[data-test=\"shopping-cart-badge\"]", "css:data-attr"],
["css=.shopping_cart_badge", "css:finder"],
["xpath=//div[@id='shopping_cart_container']/a/span", "xpath:idRelative"],
["xpath=//span", "xpath:position"],
["xpath=//span[contains(.,'3')]", "xpath:innerText"]
],
"value": ""
}]
}, {
"id": "7a04398b-4f0b-4f21-8524-73c511ab2896",
"name": "03 remove",
"commands": [{
"id": "ff1f3784-e22d-418b-878b-89a10b0a4002",
"comment": "",
"command": "open",
"target": "/",
"targets": [],
"value": ""
}, {
"id": "1f6534c7-0913-4058-9648-2c95291b565a",
"comment": "",
"command": "setWindowSize",
"target": "940x699",
"targets": [],
"value": ""
}, {
"id": "b6503907-daf1-40bb-8ad3-58b76f4ad148",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"username\"]",
"targets": [
["css=*[data-test=\"username\"]", "css:data-attr"],
["id=user-name", "id"],
["name=user-name", "name"],
["css=#user-name", "css:finder"],
["xpath=//input[@id='user-name']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div/input", "xpath:idRelative"],
["xpath=//input", "xpath:position"]
],
"value": ""
}, {
"id": "8bf0c7d1-a2a3-4e33-8276-504e653fdb76",
"comment": "",
"command": "type",
"target": "css=*[data-test=\"username\"]",
"targets": [
["css=*[data-test=\"username\"]", "css:data-attr"],
["id=user-name", "id"],
["name=user-name", "name"],
["css=#user-name", "css:finder"],
["xpath=//input[@id='user-name']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div/input", "xpath:idRelative"],
["xpath=//input", "xpath:position"]
],
"value": "standard_user"
}, {
"id": "0b367e13-dd44-431d-a6ec-a738b6b090c3",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"password\"]",
"targets": [
["css=*[data-test=\"password\"]", "css:data-attr"],
["id=password", "id"],
["name=password", "name"],
["css=#password", "css:finder"],
["xpath=//input[@id='password']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div[2]/input", "xpath:idRelative"],
["xpath=//div[2]/input", "xpath:position"]
],
"value": ""
}, {
"id": "ab1cda40-f7c2-4c0e-906d-133c34a16200",
"comment": "",
"command": "type",
"target": "css=*[data-test=\"password\"]",
"targets": [
["css=*[data-test=\"password\"]", "css:data-attr"],
["id=password", "id"],
["name=password", "name"],
["css=#password", "css:finder"],
["xpath=//input[@id='password']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/div[2]/input", "xpath:idRelative"],
["xpath=//div[2]/input", "xpath:position"]
],
"value": "secret_sauce"
}, {
"id": "2a482840-8681-44d1-b83f-75b23f74d45b",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"login-button\"]",
"targets": [
["css=*[data-test=\"login-button\"]", "css:data-attr"],
["id=login-button", "id"],
["name=login-button", "name"],
["css=#login-button", "css:finder"],
["xpath=//input[@id='login-button']", "xpath:attributes"],
["xpath=//div[@id='login_button_container']/div/form/input", "xpath:idRelative"],
["xpath=//form/input", "xpath:position"]
],
"value": ""
}, {
"id": "2cbaafca-1cfc-40e5-92b1-9f57092cb484",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"remove-sauce-labs-backpack\"]",
"targets": [
["css=*[data-test=\"remove-sauce-labs-backpack\"]", "css:data-attr"],
["id=remove-sauce-labs-backpack", "id"],
["name=remove-sauce-labs-backpack", "name"],
["css=#remove-sauce-labs-backpack", "css:finder"],
["xpath=//button[@id='remove-sauce-labs-backpack']", "xpath:attributes"],
["xpath=//div[@id='inventory_container']/div/div/div[2]/div[2]/button", "xpath:idRelative"],
["xpath=//div[2]/button", "xpath:position"],
["xpath=//button[contains(.,'Remove')]", "xpath:innerText"]
],
"value": ""
}, {
"id": "7e805ed9-642f-4cfa-9584-2f69a2ca14a5",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"remove-sauce-labs-bike-light\"]",
"targets": [
["css=*[data-test=\"remove-sauce-labs-bike-light\"]", "css:data-attr"],
["id=remove-sauce-labs-bike-light", "id"],
["name=remove-sauce-labs-bike-light", "name"],
["css=#remove-sauce-labs-bike-light", "css:finder"],
["xpath=//button[@id='remove-sauce-labs-bike-light']", "xpath:attributes"],
["xpath=//div[@id='inventory_container']/div/div[2]/div[2]/div[2]/button", "xpath:idRelative"],
["xpath=//div[2]/div[2]/div[2]/button", "xpath:position"],
["xpath=//button[contains(.,'Remove')]", "xpath:innerText"]
],
"value": ""
}, {
"id": "a53af19a-edaa-4985-b827-0a4326172b8f",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"remove-test.allthethings()-t-shirt-(red)\"]",
"targets": [
["css=*[data-test=\"remove-test.allthethings()-t-shirt-(red)\"]", "css:data-attr"],
["id=remove-test.allthethings()-t-shirt-(red)", "id"],
["name=remove-test.allthethings()-t-shirt-(red)", "name"],
["css=#remove-test\\.allthethings\\(\\)-t-shirt-\\(red\\)", "css:finder"],
["xpath=//button[@id='remove-test.allthethings()-t-shirt-(red)']", "xpath:attributes"],
["xpath=//div[@id='inventory_container']/div/div[6]/div[2]/div[2]/button", "xpath:idRelative"],
["xpath=//div[6]/div[2]/div[2]/button", "xpath:position"],
["xpath=//button[contains(.,'Remove')]", "xpath:innerText"]
],
"value": ""
}, {
"id": "f762ef53-cfa2-4d12-b24c-880461c30b33",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"shopping-cart-link\"]",
"targets": [
["css=*[data-test=\"shopping-cart-link\"]", "css:data-attr"],
["css=.shopping_cart_link", "css:finder"],
["xpath=//div[@id='shopping_cart_container']/a", "xpath:idRelative"],
["xpath=//div[3]/a", "xpath:position"]
],
"value": ""
}, {
"id": "9debc4dc-cb02-46be-b7c7-3240b43ef094",
"comment": "",
"command": "click",
"target": "css=*[data-test=\"shopping-cart-link\"]",
"targets": [
["css=*[data-test=\"shopping-cart-link\"]", "css:data-attr"],
["css=.shopping_cart_link", "css:finder"],
["xpath=//div[@id='shopping_cart_container']/a", "xpath:idRelative"],
["xpath=//div[3]/a", "xpath:position"]
],
"value": ""
}]
}],
"suites": [{
"id": "499460ff-e3a4-49ef-b8e2-ac5d8b02cfe4",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["3a5e796c-30b7-4ec3-b8f8-739c176e34f0"]
}],
"urls": ["https://www.saucedemo.com/"],
"plugins": []
}