From bcf0fb565b58400526a35f53de3fc7bd972d662c Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sat, 23 Dec 2023 00:08:39 -0500 Subject: [PATCH 1/5] Add "breakpoint" option for reconnecting in UC Mode --- seleniumbase/undetected/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/seleniumbase/undetected/__init__.py b/seleniumbase/undetected/__init__.py index 611b84d8259..4c8dd9c8d55 100644 --- a/seleniumbase/undetected/__init__.py +++ b/seleniumbase/undetected/__init__.py @@ -427,7 +427,12 @@ def reconnect(self, timeout=0.1): self.service.stop() except Exception: pass - time.sleep(timeout) + if isinstance(timeout, str): + if timeout.lower() == "breakpoint": + breakpoint() # To continue: + pass # Type "c" & press ENTER! + else: + time.sleep(timeout) try: self.service.start() except Exception: From a9a3156471841de8a0375385be2ddb9a369e722d Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sat, 23 Dec 2023 00:10:56 -0500 Subject: [PATCH 2/5] Add "brave" to valid Chromium binary_location filenames --- seleniumbase/fixtures/constants.py | 1 + 1 file changed, 1 insertion(+) diff --git a/seleniumbase/fixtures/constants.py b/seleniumbase/fixtures/constants.py index 00e93c9b7d6..8797e5c1db5 100644 --- a/seleniumbase/fixtures/constants.py +++ b/seleniumbase/fixtures/constants.py @@ -388,6 +388,7 @@ class ValidBinaries: "google-chrome-unstable", "brave-browser", "brave-browser-stable", + "brave", "opera", "opera-stable", "chrome.exe", # WSL (Windows Subsystem for Linux) From 6bfea20ab6e4f3fa60836e36c653b2447b2385ae Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sat, 23 Dec 2023 00:14:04 -0500 Subject: [PATCH 3/5] Update `coverage` version in optional dependencies --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index ac509591f42..18464e9943c 100755 --- a/requirements.txt +++ b/requirements.txt @@ -65,7 +65,7 @@ rich==13.7.0 coverage==6.2;python_version<"3.7" coverage==7.2.7;python_version>="3.7" and python_version<"3.8" -coverage==7.3.3;python_version>="3.8" +coverage==7.3.4;python_version>="3.8" pytest-cov==4.0.0;python_version<"3.7" pytest-cov==4.1.0;python_version>="3.7" flake8==5.0.4;python_version<"3.9" diff --git a/setup.py b/setup.py index 44fc1a55faf..b5c45d70fde 100755 --- a/setup.py +++ b/setup.py @@ -206,7 +206,7 @@ # Usage: coverage run -m pytest; coverage html; coverage report "coverage": [ 'coverage==7.2.7;python_version<"3.8"', - 'coverage==7.3.3;python_version>="3.8"', + 'coverage==7.3.4;python_version>="3.8"', 'pytest-cov==4.1.0', ], # pip install -e .[flake8] From e45115577362fea784f12c1d9032050ea396214d Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sat, 23 Dec 2023 00:19:58 -0500 Subject: [PATCH 4/5] Update an example test in the ReadMe --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5ddb1536507..9b441ca6564 100755 --- a/README.md +++ b/README.md @@ -114,9 +114,13 @@ class CoffeeCartTest(BaseCase): def test_coffee_cart(self): self.open("https://seleniumbase.io/coffee/") self.assert_title("Coffee Cart") + self.assert_element('button:contains("Total: $0.00")') self.click('div[data-sb="Cappuccino"]') + self.assert_exact_text("cart (1)", 'a[aria-label="Cart page"]') self.click('div[data-sb="Flat-White"]') + self.assert_exact_text("cart (2)", 'a[aria-label="Cart page"]') self.click('div[data-sb="Cafe-Latte"]') + self.assert_exact_text("cart (3)", 'a[aria-label="Cart page"]') self.click('a[aria-label="Cart page"]') self.assert_exact_text("Total: $53.00", "button.pay") self.click("button.pay") From 4c1c2bdb6ae9b8529091f1c49734aa3313e70dac Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sat, 23 Dec 2023 00:20:22 -0500 Subject: [PATCH 5/5] Version 4.22.2 --- seleniumbase/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index 267856135b7..df30ac16aa1 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.22.1" +__version__ = "4.22.2"