@duckduckgo/autoconsent 12.7.0 → 12.9.0

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/data/coverage.json +1348 -1305
  3. package/dist/addon-firefox/background.bundle.js +9 -1
  4. package/dist/addon-firefox/content.bundle.js +21 -3
  5. package/dist/addon-firefox/manifest.json +1 -1
  6. package/dist/addon-firefox/rules.json +390 -84
  7. package/dist/addon-mv3/background.bundle.js +9 -1
  8. package/dist/addon-mv3/content.bundle.js +21 -3
  9. package/dist/addon-mv3/manifest.json +1 -1
  10. package/dist/addon-mv3/popup.bundle.js +1 -1
  11. package/dist/addon-mv3/rules.json +390 -84
  12. package/dist/autoconsent.cjs.js +19 -1
  13. package/dist/autoconsent.esm.js +19 -1
  14. package/dist/autoconsent.extra.cjs.js +21 -3
  15. package/dist/autoconsent.extra.esm.js +21 -3
  16. package/dist/autoconsent.playwright.js +411 -87
  17. package/lib/cmps/sourcepoint-frame.ts +13 -0
  18. package/lib/eval-snippets.ts +14 -0
  19. package/lib/filterlist-engine.ts +2 -2
  20. package/lib/rules.ts +2 -1
  21. package/package.json +6 -3
  22. package/rules/autoconsent/civic-cookie-control.json +23 -12
  23. package/rules/autoconsent/cookie-law-info.json +4 -4
  24. package/rules/autoconsent/dsgvo.json +1 -1
  25. package/rules/autoconsent/fides.json +3 -3
  26. package/rules/autoconsent/gov-uk.json +19 -5
  27. package/rules/autoconsent/gravito.json +44 -0
  28. package/rules/autoconsent/johnlewis.json +1 -1
  29. package/rules/autoconsent/opera.com.json +7 -10
  30. package/rules/autoconsent/postnl.json +34 -0
  31. package/rules/autoconsent/privado.json +48 -0
  32. package/rules/autoconsent/quantcast.json +22 -4
  33. package/rules/autoconsent/shopify.json +31 -0
  34. package/rules/autoconsent/squiz.json +39 -0
  35. package/rules/autoconsent/tccCmpAlert.json +25 -0
  36. package/rules/autoconsent/tealium.json +1 -1
  37. package/rules/autoconsent/termly.json +2 -2
  38. package/rules/autoconsent/true-car.json +1 -1
  39. package/rules/autoconsent/twitter.json +1 -2
  40. package/rules/autoconsent/womenshealthmag-us.json +31 -0
  41. package/rules/filterlist.txt +96 -330
  42. package/rules/rules.json +390 -84
  43. package/scripts/get-text-for-xpath.ts +5 -2
  44. package/scripts/validate-json-rules.js +45 -0
  45. package/tests/civic-cookie-control.spec.ts +7 -3
  46. package/tests/cookielawinfo.spec.ts +3 -1
  47. package/tests/fides.spec.ts +1 -1
  48. package/tests/gravito.spec.ts +3 -0
  49. package/tests/postnl.spec.ts +3 -0
  50. package/tests/privado.spec.ts +3 -0
  51. package/tests/shopify.spec.ts +7 -0
  52. package/tests/squiz.spec.ts +3 -0
  53. package/tests/tccCmpAlert.spec.ts +3 -0
  54. package/tests/termly.spec.ts +11 -1
  55. package/tests/womenshealthmag-us.spec.ts +3 -0
  56. package/rules/autoconsent/wetransfer.json +0 -7
  57. package/tests/wetransfer.spec.ts +0 -5
package/rules/rules.json CHANGED
@@ -1227,39 +1227,54 @@
1227
1227
  "optOut": [
1228
1228
  {
1229
1229
  "if": {
1230
- "exists": "#ccc-notify"
1230
+ "visible": ".ccc-reject-button"
1231
1231
  },
1232
1232
  "then": [
1233
1233
  {
1234
- "waitForThenClick": [
1235
- "#ccc #ccc-notify .ccc-notify-buttons",
1236
- "xpath///button[contains(., 'Settings') or contains(., 'Cookie Preferences')]"
1237
- ]
1238
- },
1239
- {
1240
- "waitForVisible": "#ccc-module"
1241
- }
1242
- ]
1243
- },
1244
- {
1245
- "if": {
1246
- "exists": "#ccc-reject-settings"
1247
- },
1248
- "then": [
1249
- {
1250
- "waitForThenClick": "#ccc-reject-settings"
1234
+ "waitForThenClick": ".ccc-reject-button"
1251
1235
  }
1252
1236
  ],
1253
1237
  "else": [
1254
1238
  {
1255
- "waitForThenClick": "#ccc-dismiss-button"
1239
+ "if": {
1240
+ "exists": [
1241
+ "#ccc #ccc-notify .ccc-notify-buttons",
1242
+ "xpath///button[contains(., 'Settings') or contains(., 'Cookie Preferences') or contains(., 'Einstellungen️')]"
1243
+ ]
1244
+ },
1245
+ "then": [
1246
+ {
1247
+ "waitForThenClick": [
1248
+ "#ccc #ccc-notify .ccc-notify-buttons",
1249
+ "xpath///button[contains(., 'Settings') or contains(., 'Cookie Preferences') or contains(., 'Einstellungen️')]"
1250
+ ]
1251
+ },
1252
+ {
1253
+ "waitForVisible": "#ccc-module"
1254
+ }
1255
+ ]
1256
+ },
1257
+ {
1258
+ "if": {
1259
+ "visible": ".ccc-reject-button"
1260
+ },
1261
+ "then": [
1262
+ {
1263
+ "waitForThenClick": ".ccc-reject-button"
1264
+ }
1265
+ ],
1266
+ "else": [
1267
+ {
1268
+ "waitForThenClick": "#ccc-dismiss-button"
1269
+ }
1270
+ ]
1256
1271
  }
1257
1272
  ]
1258
1273
  }
1259
1274
  ],
1260
1275
  "optIn": [
1261
1276
  {
1262
- "waitForThenClick": "#ccc-recommended-settings,#ccc-notify-accept"
1277
+ "waitForThenClick": "#ccc-recommended-settings,#ccc-notify-accept,.ccc-accept-button"
1263
1278
  }
1264
1279
  ]
1265
1280
  },
@@ -1813,7 +1828,7 @@
1813
1828
  {
1814
1829
  "name": "cookie-law-info",
1815
1830
  "prehideSelectors": [
1816
- "#cookie-law-info-bar"
1831
+ "#cookie-law-info-bar, #cookie-law-bg"
1817
1832
  ],
1818
1833
  "detectCmp": [
1819
1834
  {
@@ -1825,17 +1840,18 @@
1825
1840
  ],
1826
1841
  "detectPopup": [
1827
1842
  {
1828
- "visible": "#cookie-law-info-bar"
1843
+ "visible": "#cookie-law-info-bar, #cookie-law-bg",
1844
+ "check": "any"
1829
1845
  }
1830
1846
  ],
1831
1847
  "optIn": [
1832
1848
  {
1833
- "click": "[data-cli_action=\"accept_all\"]"
1849
+ "click": "[data-cli_action=\"accept\"]"
1834
1850
  }
1835
1851
  ],
1836
1852
  "optOut": [
1837
1853
  {
1838
- "hide": "#cookie-law-info-bar"
1854
+ "hide": "#cookie-law-info-bar, #cookie-law-bg"
1839
1855
  },
1840
1856
  {
1841
1857
  "eval": "EVAL_COOKIE_LAW_INFO_0"
@@ -2735,7 +2751,7 @@
2735
2751
  },
2736
2752
  {
2737
2753
  "name": "WP DSGVO Tools",
2738
- "link": "https://wordpress.org/plugins/shapepress-dsgvo/",
2754
+ "vendorUrl": "https://wordpress.org/plugins/shapepress-dsgvo/",
2739
2755
  "prehideSelectors": [
2740
2756
  ".sp-dsgvo"
2741
2757
  ],
@@ -3231,16 +3247,16 @@
3231
3247
  "name": "fides",
3232
3248
  "vendorUrl": "https://github.com/ethyca/fides",
3233
3249
  "prehideSelectors": [
3234
- "#fides-overlay"
3250
+ "#fides-overlay, #fides-overlay-wrapper"
3235
3251
  ],
3236
3252
  "detectCmp": [
3237
3253
  {
3238
- "exists": "#fides-overlay #fides-banner"
3254
+ "exists": "#fides-overlay-wrapper #fides-banner"
3239
3255
  }
3240
3256
  ],
3241
3257
  "detectPopup": [
3242
3258
  {
3243
- "visible": "#fides-overlay #fides-banner"
3259
+ "visible": "#fides-overlay-wrapper #fides-banner"
3244
3260
  },
3245
3261
  {
3246
3262
  "eval": "EVAL_FIDES_DETECT_POPUP"
@@ -3428,25 +3444,100 @@
3428
3444
  "name": "gov.uk",
3429
3445
  "detectCmp": [
3430
3446
  {
3431
- "exists": "#global-cookie-message"
3447
+ "exists": ".govuk-cookie-banner__message"
3432
3448
  }
3433
3449
  ],
3434
3450
  "detectPopup": [
3435
3451
  {
3436
- "exists": "#global-cookie-message"
3452
+ "exists": ".govuk-cookie-banner__message .govuk-button"
3437
3453
  }
3438
3454
  ],
3439
3455
  "optIn": [
3440
3456
  {
3441
- "click": "button[data-accept-cookies=true]"
3457
+ "click": [
3458
+ ".govuk-cookie-banner__message",
3459
+ "xpath///button[contains(., 'Accept')] | //a[contains(., 'Accept')]"
3460
+ ]
3442
3461
  }
3443
3462
  ],
3444
3463
  "optOut": [
3445
3464
  {
3446
- "click": "button[data-reject-cookies=true],#reject-cookies"
3465
+ "if": {
3466
+ "exists": [
3467
+ ".govuk-cookie-banner__message",
3468
+ "xpath///button[contains(., 'Reject')] | //a[contains(., 'Reject')]"
3469
+ ]
3470
+ },
3471
+ "then": [
3472
+ {
3473
+ "click": [
3474
+ ".govuk-cookie-banner__message",
3475
+ "xpath///button[contains(., 'Reject')] | //a[contains(., 'Reject')]"
3476
+ ]
3477
+ }
3478
+ ]
3447
3479
  },
3448
3480
  {
3449
- "click": "button[data-hide-cookie-banner=true],#hide-cookie-decision"
3481
+ "if": {
3482
+ "exists": [
3483
+ ".govuk-cookie-banner__message",
3484
+ "xpath///button[contains(., 'Hide')] | //a[contains(., 'Hide')]"
3485
+ ]
3486
+ },
3487
+ "then": [
3488
+ {
3489
+ "click": [
3490
+ ".govuk-cookie-banner__message",
3491
+ "xpath///button[contains(., 'Hide')] | //a[contains(., 'Hide')]"
3492
+ ]
3493
+ }
3494
+ ]
3495
+ }
3496
+ ]
3497
+ },
3498
+ {
3499
+ "name": "gravito",
3500
+ "vendorUrl": "https://www.gravito.net/cmp/",
3501
+ "prehideSelectors": [
3502
+ ".gravitoCMP-background-overlay"
3503
+ ],
3504
+ "detectCmp": [
3505
+ {
3506
+ "exists": ".gravitoCMP-background-overlay"
3507
+ }
3508
+ ],
3509
+ "detectPopup": [
3510
+ {
3511
+ "visible": ".gravitoCMP-background-overlay"
3512
+ }
3513
+ ],
3514
+ "optIn": [
3515
+ {
3516
+ "waitForThenClick": "#modalConfirmBtn.gravitoCMP-button"
3517
+ }
3518
+ ],
3519
+ "optOut": [
3520
+ {
3521
+ "waitForThenClick": "#modalSettingBtn.gravitoCMP-button"
3522
+ },
3523
+ {
3524
+ "waitFor": "#allRejectBtn"
3525
+ },
3526
+ {
3527
+ "waitFor": ".gravitoCMP-content-section"
3528
+ },
3529
+ {
3530
+ "click": ".gravitoCMP-content input[type=checkbox]:checked",
3531
+ "all": true,
3532
+ "optional": true
3533
+ },
3534
+ {
3535
+ "waitForThenClick": "#allRejectBtn"
3536
+ }
3537
+ ],
3538
+ "test": [
3539
+ {
3540
+ "eval": "EVAL_GRAVITO_TEST"
3450
3541
  }
3451
3542
  ]
3452
3543
  },
@@ -3996,7 +4087,7 @@
3996
4087
  "click": "button[data-test^=manage-cookies]"
3997
4088
  },
3998
4089
  {
3999
- "wait": "500"
4090
+ "wait": 500
4000
4091
  },
4001
4092
  {
4002
4093
  "click": "label[data-test^=toggle][class*=checked]:not([class*=disabled])",
@@ -5138,35 +5229,32 @@
5138
5229
  },
5139
5230
  {
5140
5231
  "name": "opera.com",
5141
- "vendorUrl": "https://unknown",
5232
+ "vendorUrl": "https://opera.com",
5142
5233
  "cosmetic": false,
5143
5234
  "runContext": {
5144
- "main": true,
5145
- "frame": false
5235
+ "urlPattern": "^https?://(www\\.|)?opera\\.com/"
5146
5236
  },
5147
- "intermediate": false,
5148
- "prehideSelectors": [],
5237
+ "prehideSelectors": [
5238
+ "#cookie-consent"
5239
+ ],
5149
5240
  "detectCmp": [
5150
5241
  {
5151
- "exists": "#cookie-consent .manage-cookies__btn"
5242
+ "exists": "#cookie-consent .cookie-all__btn"
5152
5243
  }
5153
5244
  ],
5154
5245
  "detectPopup": [
5155
5246
  {
5156
- "visible": "#cookie-consent .cookie-basic-consent__btn"
5247
+ "visible": "#cookie-consent .cookie-all__btn"
5157
5248
  }
5158
5249
  ],
5159
5250
  "optIn": [
5160
5251
  {
5161
- "waitForThenClick": "#cookie-consent .cookie-basic-consent__btn"
5252
+ "waitForThenClick": "#cookie-consent .cookie-all__btn"
5162
5253
  }
5163
5254
  ],
5164
5255
  "optOut": [
5165
5256
  {
5166
- "waitForThenClick": "#cookie-consent .manage-cookies__btn"
5167
- },
5168
- {
5169
- "waitForThenClick": "#cookie-consent .active.marketing_option_switch.cookie-consent__switch",
5257
+ "waitForThenClick": "#cookie-consent .cookie-consent__switch:not(.always_on)",
5170
5258
  "all": true
5171
5259
  },
5172
5260
  {
@@ -5525,6 +5613,48 @@
5525
5613
  }
5526
5614
  ]
5527
5615
  },
5616
+ {
5617
+ "name": "postnl",
5618
+ "vendorUrl": "https://postnl.nl",
5619
+ "cosmetic": false,
5620
+ "runContext": {
5621
+ "urlPattern": "^https://([^.]+\\.)?postnl\\.nl/"
5622
+ },
5623
+ "prehideSelectors": [
5624
+ "pnl-cookie-wall-widget"
5625
+ ],
5626
+ "detectCmp": [
5627
+ {
5628
+ "exists": "pnl-cookie-wall-widget"
5629
+ }
5630
+ ],
5631
+ "detectPopup": [
5632
+ {
5633
+ "visible": "pnl-cookie-wall-widget"
5634
+ }
5635
+ ],
5636
+ "optIn": [
5637
+ {
5638
+ "waitForThenClick": [
5639
+ "pnl-cookie-wall-widget",
5640
+ "button.pci-button--primary"
5641
+ ]
5642
+ }
5643
+ ],
5644
+ "optOut": [
5645
+ {
5646
+ "waitForThenClick": [
5647
+ "pnl-cookie-wall-widget",
5648
+ "button.pci-button--secondary"
5649
+ ]
5650
+ }
5651
+ ],
5652
+ "test": [
5653
+ {
5654
+ "eval": "EVAL_POSTNL_TEST"
5655
+ }
5656
+ ]
5657
+ },
5528
5658
  {
5529
5659
  "name": "PrimeBox CookieBar",
5530
5660
  "prehideSelectors": [
@@ -5622,6 +5752,56 @@
5622
5752
  }
5623
5753
  ]
5624
5754
  },
5755
+ {
5756
+ "name": "privado",
5757
+ "vendorUrl": "https://www.privado.ai/cookie-consent",
5758
+ "cosmetic": false,
5759
+ "runContext": {
5760
+ "main": true,
5761
+ "frame": false
5762
+ },
5763
+ "prehideSelectors": [
5764
+ "#cookie-consent-banner"
5765
+ ],
5766
+ "detectCmp": [
5767
+ {
5768
+ "exists": "#cookie-consent-banner #accept-button"
5769
+ }
5770
+ ],
5771
+ "detectPopup": [
5772
+ {
5773
+ "visible": "#cookie-consent-banner #accept-button"
5774
+ }
5775
+ ],
5776
+ "optIn": [
5777
+ {
5778
+ "waitForThenClick": "#cookie-consent-banner #accept-button"
5779
+ }
5780
+ ],
5781
+ "optOut": [
5782
+ {
5783
+ "if": {
5784
+ "exists": "#cookie-consent-banner #deny-button"
5785
+ },
5786
+ "then": [
5787
+ {
5788
+ "waitForThenClick": "#cookie-consent-banner #deny-button"
5789
+ }
5790
+ ],
5791
+ "else": [
5792
+ {
5793
+ "waitForThenClick": "#cookie-consent-banner #manage-settings-button"
5794
+ },
5795
+ {
5796
+ "waitForVisible": "#manage-cookies #save-button"
5797
+ },
5798
+ {
5799
+ "waitForThenClick": "#manage-cookies #save-button"
5800
+ }
5801
+ ]
5802
+ }
5803
+ ]
5804
+ },
5625
5805
  {
5626
5806
  "name": "productz.com",
5627
5807
  "vendorUrl": "https://productz.com/",
@@ -5727,7 +5907,7 @@
5727
5907
  "click": ".qc-cmp2-summary-buttons > button[mode=\"secondary\"]:nth-of-type(1)"
5728
5908
  },
5729
5909
  {
5730
- "waitFor": "#qc-cmp2-ui"
5910
+ "waitForVisible": "#qc-cmp2-ui .qc-cmp2-consent-info"
5731
5911
  },
5732
5912
  {
5733
5913
  "click": ".qc-cmp2-toggle-switch > button[aria-checked=\"true\"]",
@@ -5735,12 +5915,33 @@
5735
5915
  "optional": true
5736
5916
  },
5737
5917
  {
5738
- "click": ".qc-cmp2-main button[aria-label=\"REJECT ALL\"]",
5918
+ "click": [
5919
+ ".qc-cmp2-main",
5920
+ "xpath///button[contains(., 'REJECT ALL') or contains(., 'ALLE VERWERPEN') or contains(., 'ΑΠΟΡΡΙΠΤΩ ΤΑ ΠΑΝΤΑ') or contains(., 'RESPINGERE TOTALĂ') or contains(., 'ALLE ABLEHNEN') or contains(., 'ODRZUCENIE') or contains(., 'BLOQUEAR TODO') or contains(., 'REJEITAR TODOS') or contains(., 'RIFIUTA TUTTO') or contains(., 'TOUT REFUSER') or contains(., 'ОТКЛОНИТЬ ВСЕХ')]"
5921
+ ],
5739
5922
  "optional": true
5740
5923
  },
5741
5924
  {
5742
- "waitForThenClick": ".qc-cmp2-main button[aria-label=\"SAVE & EXIT\"],.qc-cmp2-buttons-desktop > button[mode=\"primary\"]",
5743
- "timeout": 5000
5925
+ "wait": 500
5926
+ },
5927
+ {
5928
+ "if": {
5929
+ "exists": ".qc-cmp2-buttons-desktop > button[mode=primary]"
5930
+ },
5931
+ "then": [
5932
+ {
5933
+ "click": ".qc-cmp2-buttons-desktop > button[mode=primary]"
5934
+ }
5935
+ ],
5936
+ "else": [
5937
+ {
5938
+ "waitForThenClick": [
5939
+ ".qc-cmp2-main",
5940
+ "xpath///button[contains(.,'SAVE & EXIT') or contains(.,'SALVA ED ESCI') or contains(.,'GUARDAR Y SALIR') or contains(.,'SPEICHERN & VERLASSEN')"
5941
+ ],
5942
+ "timeout": 5000
5943
+ }
5944
+ ]
5744
5945
  }
5745
5946
  ]
5746
5947
  }
@@ -5994,6 +6195,39 @@
5994
6195
  }
5995
6196
  ]
5996
6197
  },
6198
+ {
6199
+ "name": "shopify",
6200
+ "vendorUrl": "https://shopify.dev/docs/api/customer-privacy",
6201
+ "cosmetic": false,
6202
+ "prehideSelectors": [
6203
+ "#shopify-pc__banner"
6204
+ ],
6205
+ "detectCmp": [
6206
+ {
6207
+ "exists": "#shopify-pc__banner"
6208
+ }
6209
+ ],
6210
+ "detectPopup": [
6211
+ {
6212
+ "visible": "#shopify-pc__banner"
6213
+ }
6214
+ ],
6215
+ "optIn": [
6216
+ {
6217
+ "waitForThenClick": "#shopify-pc__banner__btn-accept"
6218
+ }
6219
+ ],
6220
+ "optOut": [
6221
+ {
6222
+ "waitForThenClick": "#shopify-pc__banner__btn-decline"
6223
+ }
6224
+ ],
6225
+ "test": [
6226
+ {
6227
+ "eval": "EVAL_SHOPIFY_TEST"
6228
+ }
6229
+ ]
6230
+ },
5997
6231
  {
5998
6232
  "name": "sibbo",
5999
6233
  "prehideSelectors": [
@@ -6150,6 +6384,47 @@
6150
6384
  }
6151
6385
  ]
6152
6386
  },
6387
+ {
6388
+ "name": "squiz",
6389
+ "vendorUrl": "https://www.squiz.net/webinars/cdp",
6390
+ "cosmetic": false,
6391
+ "runContext": {
6392
+ "main": true,
6393
+ "frame": false,
6394
+ "urlPattern": ""
6395
+ },
6396
+ "prehideSelectors": [
6397
+ "#cookie-consent-banner"
6398
+ ],
6399
+ "detectCmp": [
6400
+ {
6401
+ "exists": "#cookie-consent-banner #accept-cdp-cookie"
6402
+ }
6403
+ ],
6404
+ "detectPopup": [
6405
+ {
6406
+ "visible": "#cookie-consent-banner #accept-cdp-cookie"
6407
+ }
6408
+ ],
6409
+ "optIn": [
6410
+ {
6411
+ "waitForThenClick": "#accept-cdp-cookie"
6412
+ }
6413
+ ],
6414
+ "optOut": [
6415
+ {
6416
+ "waitForThenClick": "#reject-cdp-cookie"
6417
+ }
6418
+ ],
6419
+ "test": [
6420
+ {
6421
+ "wait": 500
6422
+ },
6423
+ {
6424
+ "eval": "EVAL_SQUIZ_TEST"
6425
+ }
6426
+ ]
6427
+ },
6153
6428
  {
6154
6429
  "name": "steampowered.com",
6155
6430
  "detectCmp": [
@@ -6362,6 +6637,33 @@
6362
6637
  }
6363
6638
  ]
6364
6639
  },
6640
+ {
6641
+ "name": "tccCmpAlert",
6642
+ "vendorUrl": "https://unknown",
6643
+ "prehideSelectors": [
6644
+ "#tccCmpAlert"
6645
+ ],
6646
+ "detectCmp": [
6647
+ {
6648
+ "exists": "#tccCmpAlert"
6649
+ }
6650
+ ],
6651
+ "detectPopup": [
6652
+ {
6653
+ "visible": "#tccCmpAlert"
6654
+ }
6655
+ ],
6656
+ "optIn": [
6657
+ {
6658
+ "waitForThenClick": "xpath///span[contains(.,'Accetta tutto')]"
6659
+ }
6660
+ ],
6661
+ "optOut": [
6662
+ {
6663
+ "waitForThenClick": "xpath///span[contains(.,'Accetta solo cookie necessari')]"
6664
+ }
6665
+ ]
6666
+ },
6365
6667
  {
6366
6668
  "name": "Tealium",
6367
6669
  "prehideSelectors": [
@@ -6392,7 +6694,7 @@
6392
6694
  "hide": "#__tealiumGDPRecModal,#__tealiumGDPRcpPrefs,#__tealiumImplicitmodal"
6393
6695
  },
6394
6696
  {
6395
- "waitForThenClick": "#cm-acceptNone,.js-accept-essential-cookies,#continueWithoutAccepting",
6697
+ "waitForThenClick": "#cm-acceptNone,.js-accept-essential-cookies,#continueWithoutAccepting,#no_consent",
6396
6698
  "timeout": 1000,
6397
6699
  "optional": true
6398
6700
  }
@@ -6490,10 +6792,11 @@
6490
6792
  ],
6491
6793
  "else": [
6492
6794
  {
6493
- "click": ".t-preference-button"
6795
+ "waitForThenClick": ".t-preference-button,[data-testid=\"preferences-link\"]"
6494
6796
  },
6495
6797
  {
6496
- "wait": 500
6798
+ "waitFor": ".t-declineAllButton",
6799
+ "timeout": 700
6497
6800
  },
6498
6801
  {
6499
6802
  "if": {
@@ -7047,9 +7350,7 @@
7047
7350
  },
7048
7351
  "cosmetic": true,
7049
7352
  "prehideSelectors": [
7050
- [
7051
- "div[aria-labelledby=\"cookie-banner-heading\"]"
7052
- ]
7353
+ "div[aria-labelledby=\"cookie-banner-heading\"]"
7053
7354
  ],
7054
7355
  "detectCmp": [
7055
7356
  {
@@ -7239,11 +7540,6 @@
7239
7540
  {
7240
7541
  "waitForThenClick": "[data-testid=\"BottomBar\"] > div:has(>div:first-child>div:last-child>button[role=button]>span) > div:last-child > button[role=button]:last-child"
7241
7542
  }
7242
- ],
7243
- "TODOtest": [
7244
- {
7245
- "eval": "EVAL_document.cookie.includes('d_prefs=MjoxLGNvbnNlbnRfdmVyc2lvbjoy')"
7246
- }
7247
7543
  ]
7248
7544
  },
7249
7545
  {
@@ -7606,29 +7902,6 @@
7606
7902
  }
7607
7903
  ]
7608
7904
  },
7609
- {
7610
- "name": "wetransfer.com",
7611
- "detectCmp": [
7612
- {
7613
- "exists": ".welcome__cookie-notice"
7614
- }
7615
- ],
7616
- "detectPopup": [
7617
- {
7618
- "visible": ".welcome__cookie-notice"
7619
- }
7620
- ],
7621
- "optIn": [
7622
- {
7623
- "click": ".welcome__button--accept"
7624
- }
7625
- ],
7626
- "optOut": [
7627
- {
7628
- "click": ".welcome__button--decline"
7629
- }
7630
- ]
7631
- },
7632
7905
  {
7633
7906
  "name": "whitepages.com",
7634
7907
  "runContext": {
@@ -7688,6 +7961,39 @@
7688
7961
  }
7689
7962
  ]
7690
7963
  },
7964
+ {
7965
+ "name": "womenshealthmag-us",
7966
+ "vendorUrl": "https://womenshealthmag.com",
7967
+ "cosmetic": true,
7968
+ "runContext": {
7969
+ "main": true,
7970
+ "frame": false,
7971
+ "urlPattern": "^https://(www\\.)?womenshealthmag\\.com/"
7972
+ },
7973
+ "prehideSelectors": [
7974
+ "[status=open]:has([aria-label=\"Privacy Disclosure\"])"
7975
+ ],
7976
+ "detectCmp": [
7977
+ {
7978
+ "exists": "[status=open]:has([aria-label=\"Privacy Disclosure\"])"
7979
+ }
7980
+ ],
7981
+ "detectPopup": [
7982
+ {
7983
+ "visible": "[status=open]:has([aria-label=\"Privacy Disclosure\"])"
7984
+ }
7985
+ ],
7986
+ "optIn": [
7987
+ {
7988
+ "waitForThenClick": "[status=open]:has([aria-label=\"Privacy Disclosure\"]) button"
7989
+ }
7990
+ ],
7991
+ "optOut": [
7992
+ {
7993
+ "hide": "[status=open]:has([aria-label=\"Privacy Disclosure\"])"
7994
+ }
7995
+ ]
7996
+ },
7691
7997
  {
7692
7998
  "name": "woo-commerce-com",
7693
7999
  "prehideSelectors": [
@@ -11,7 +11,6 @@ const locales = [
11
11
  'de',
12
12
  'el',
13
13
  'en',
14
- 'en',
15
14
  'es',
16
15
  'et',
17
16
  'fi',
@@ -42,7 +41,7 @@ const values = new Set();
42
41
  console.log(`Checking contents of ${xpath} on ${url}`);
43
42
 
44
43
  (async () => {
45
- const browser = await chromium.launch();
44
+ const browser = await chromium.launch({ headless: false });
46
45
 
47
46
  async function checkLocale(locale: string) {
48
47
  const context = await browser.newContext({ locale });
@@ -51,6 +50,10 @@ console.log(`Checking contents of ${xpath} on ${url}`);
51
50
  waitUntil: 'networkidle',
52
51
  timeout: 30000,
53
52
  });
53
+
54
+ // add extra interactions here if necessary, e.g.
55
+ // await page.locator('.my-button').click();
56
+
54
57
  const locator = page.locator(`xpath=${xpath}`);
55
58
  const content = await locator.textContent();
56
59
  console.log(locale, content);