diff --git a/Run-JavaScript-before-change-detection.md b/Run-JavaScript-before-change-detection.md index c99ea64..773f5bf 100644 --- a/Run-JavaScript-before-change-detection.md +++ b/Run-JavaScript-before-change-detection.md @@ -30,6 +30,11 @@ document.querySelector("input[type=submit]").click(); document.querySelector("input[type=text]").value="stripes on a tiger never fade"; document.querySelector("input[value='Google Search']").click(); ``` +#### Accept or Reject cookie/data + +``` +document.evaluate("//span[contains(., 'Reject all')]", document, null, XPathResult.ANY_TYPE, null ).iterateNext().click(); +``` ### Accept cookie alert info https://edition.cnn.com ( shared watch import link https://changedetection.io/share/-ANRwLTBCNMa )