From 098c8bc99c84e6b09ee0066ed85b216ec63a046a Mon Sep 17 00:00:00 2001 From: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Date: Wed, 16 Apr 2025 20:00:48 +0200 Subject: [PATCH] Disabled Chrome browser pop-ups that were interfering with selenium tests. --- django/test/selenium.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/django/test/selenium.py b/django/test/selenium.py index 4ef5015556..15ee3002ec 100644 --- a/django/test/selenium.py +++ b/django/test/selenium.py @@ -81,6 +81,10 @@ class SeleniumTestCaseBase(type(LiveServerTestCase)): def create_options(self): options = self.import_options(self.browser)() + if self.browser == "chrome": + # Disable Google Password Manager "Data Breach" alert pop-ups. + options.add_argument("--guest") + options.add_argument("--disable-infobars") if self.headless: match self.browser: case "chrome" | "edge":