Skip to content

Commit bd4a1a9

Browse files
authored
Merge pull request #1628 from seleniumbase/dependencies-and-error-handling
Refresh dependencies and update error-handling
2 parents 2fe10e5 + e302281 commit bd4a1a9

File tree

6 files changed

+23
-19
lines changed

6 files changed

+23
-19
lines changed

examples/verify_undetected.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class UndetectedTest(BaseCase):
1010
def test_browser_is_undetected(self):
11-
self.open("https://nowsecure.nl")
11+
self.open("https://nowsecure.nl/#relax")
1212
try:
1313
self.assert_text("OH YEAH, you passed!", "h1", timeout=6.75)
1414
self.post_message("Selenium wasn't detected!", duration=1.6)

mkdocs_build/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jsmin==3.0.1
2222
lunr==0.6.2
2323
nltk==3.7
2424
tornado==6.2
25-
watchdog==2.1.9
25+
watchdog==2.2.0
2626
cairocffi==1.4.0
2727
cairosvg==2.5.2
2828
cssselect2==0.7.0

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ certifi>=2021.10.8;python_version<"3.6"
1818
certifi>=2022.9.24;python_version>="3.6"
1919
filelock>=3.2.1;python_version<"3.6"
2020
filelock>=3.4.1;python_version>="3.6" and python_version<"3.7"
21-
filelock>=3.8.0;python_version>="3.7"
21+
filelock>=3.8.2;python_version>="3.7"
2222
platformdirs>=2.0.2;python_version<"3.6"
2323
platformdirs>=2.4.0;python_version>="3.6" and python_version<"3.7"
2424
platformdirs>=2.5.4;python_version>="3.7"
@@ -80,7 +80,7 @@ pytest-rerunfailures==8.0;python_version<"3.6"
8080
pytest-rerunfailures==10.3;python_version>="3.6"
8181
pytest-xdist==1.34.0;python_version<"3.6"
8282
pytest-xdist==2.5.0;python_version>="3.6" and python_version<"3.7"
83-
pytest-xdist==3.0.2;python_version>="3.7"
83+
pytest-xdist==3.1.0;python_version>="3.7"
8484
parameterized==0.8.1
8585
sbvirtualdisplay==1.1.1
8686
behave==1.2.6
@@ -99,7 +99,7 @@ pyreadline==2.1;platform_system=="Windows" and python_version<"3.6"
9999
pyreadline3==3.4.1;platform_system=="Windows" and python_version>="3.6"
100100
pyrepl==0.9.0
101101
tabcompleter==1.0.0
102-
pdbp==1.2.3
102+
pdbp==1.2.4
103103
colorama==0.4.6;python_version<"3.6"
104104
colorama==0.4.5;python_version>="3.6" and python_version<"3.7"
105105
colorama==0.4.6;python_version>="3.7"

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.9.5"
2+
__version__ = "4.9.6"

seleniumbase/fixtures/base_case.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,13 @@ def open(self, url):
241241
"cannot determine loading status" in e.msg
242242
or "unexpected command response" in e.msg
243243
):
244-
pass # Odd issue where the open did happen. Continue.
244+
if self.__needs_minimum_wait():
245+
time.sleep(0.2)
246+
self.driver.get(url)
247+
else:
248+
pass # Odd issue where the open did happen. Continue.
245249
else:
246-
raise Exception(e.msg)
250+
raise
247251
if self.driver.current_url == pre_action_url and pre_action_url != url:
248252
time.sleep(0.1) # Make sure load happens
249253
if settings.WAIT_FOR_RSC_ON_PAGE_LOADS:
@@ -702,7 +706,7 @@ def update_text(
702706
):
703707
pass # Odd issue where the click did happen. Continue.
704708
else:
705-
raise e
709+
raise
706710
if settings.WAIT_FOR_RSC_ON_PAGE_LOADS:
707711
self.wait_for_ready_state_complete()
708712
except (StaleElementReferenceException, ENI_Exception):
@@ -725,7 +729,7 @@ def update_text(
725729
):
726730
pass # Odd issue where the click did happen. Continue.
727731
else:
728-
raise e
732+
raise
729733
if settings.WAIT_FOR_RSC_ON_PAGE_LOADS:
730734
self.wait_for_ready_state_complete()
731735
if self.__needs_minimum_wait():
@@ -2206,7 +2210,7 @@ def hover_on_element(self, selector, by="css selector"):
22062210
# (Pure hover actions won't work on early chromedriver versions)
22072211
try:
22082212
return page_actions.hover_on_element(self.driver, selector, by)
2209-
except WebDriverException as e:
2213+
except WebDriverException:
22102214
driver_capabilities = self.driver.capabilities
22112215
if "version" in driver_capabilities:
22122216
chrome_version = driver_capabilities["version"]
@@ -2232,7 +2236,7 @@ def hover_on_element(self, selector, by="css selector"):
22322236
)
22332237
raise Exception(message)
22342238
else:
2235-
raise Exception(e)
2239+
raise
22362240

22372241
def hover_and_click(
22382242
self,
@@ -11859,9 +11863,9 @@ def __click_with_offset(
1185911863
"The offset must stay inside the target element!"
1186011864
)
1186111865
raise Exception(message)
11862-
except InvalidArgumentException as e:
11866+
except InvalidArgumentException:
1186311867
if not self.browser == "chrome":
11864-
raise Exception(e)
11868+
raise
1186511869
driver_capabilities = self.driver.capabilities
1186611870
if "version" in driver_capabilities:
1186711871
chrome_version = driver_capabilities["version"]
@@ -11876,7 +11880,7 @@ def __click_with_offset(
1187611880
int(major_chromedriver_version) >= 76
1187711881
and int(major_chrome_version) >= 76
1187811882
):
11879-
raise Exception(e)
11883+
raise
1188011884
install_sb = (
1188111885
"seleniumbase get chromedriver %s" % major_chrome_version
1188211886
)
@@ -11893,7 +11897,7 @@ def __click_with_offset(
1189311897
)
1189411898
raise Exception(message)
1189511899
else:
11896-
raise Exception(e)
11900+
raise
1189711901
if self.demo_mode:
1189811902
self.__demo_mode_pause_if_active()
1189911903
elif self.slow_mode:

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
'certifi>=2022.9.24;python_version>="3.6"',
144144
'filelock>=3.2.1;python_version<"3.6"',
145145
'filelock>=3.4.1;python_version>="3.6" and python_version<"3.7"',
146-
'filelock>=3.8.0;python_version>="3.7"',
146+
'filelock>=3.8.2;python_version>="3.7"',
147147
'platformdirs>=2.0.2;python_version<"3.6"',
148148
'platformdirs>=2.4.0;python_version>="3.6" and python_version<"3.7"',
149149
'platformdirs>=2.5.4;python_version>="3.7"',
@@ -204,7 +204,7 @@
204204
'pytest-rerunfailures==10.3;python_version>="3.6"',
205205
'pytest-xdist==1.34.0;python_version<"3.6"',
206206
'pytest-xdist==2.5.0;python_version>="3.6" and python_version<"3.7"',
207-
'pytest-xdist==3.0.2;python_version>="3.7"',
207+
'pytest-xdist==3.1.0;python_version>="3.7"',
208208
"parameterized==0.8.1",
209209
"sbvirtualdisplay==1.1.1",
210210
"behave==1.2.6",
@@ -223,7 +223,7 @@
223223
'pyreadline3==3.4.1;platform_system=="Windows" and python_version>="3.6"', # noqa: E501
224224
"pyrepl==0.9.0",
225225
"tabcompleter==1.0.0",
226-
"pdbp==1.2.3",
226+
"pdbp==1.2.4",
227227
'colorama==0.4.6;python_version<"3.6"',
228228
'colorama==0.4.5;python_version>="3.6" and python_version<"3.7"',
229229
'colorama==0.4.6;python_version>="3.7"',

0 commit comments

Comments
 (0)