File tree Expand file tree Collapse file tree 7 files changed +30
-10
lines changed Expand file tree Collapse file tree 7 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 10
10
class RepeatTests (BaseCase ):
11
11
@parameterized .expand ([[]] * 2 )
12
12
def test_repeat_this_test_with_parameterized (self ):
13
- self .page_load_strategy = "none"
14
13
self .open ("seleniumbase.github.io" )
15
14
self .click ('a[href="help_docs/method_summary/"]' )
16
15
self .assert_text ("API Reference" , "h1" )
17
16
18
17
19
18
@pytest .mark .parametrize ("" , [[]] * 2 )
20
19
def test_repeat_this_test_with_pytest_parametrize (sb ):
21
- sb .page_load_strategy = "none"
22
20
sb .open ("seleniumbase.github.io" )
23
21
sb .click ('a[href="seleniumbase/console_scripts/ReadMe/"]' )
24
22
sb .assert_text ("Console Scripts" , "h1" )
@@ -27,7 +25,6 @@ def test_repeat_this_test_with_pytest_parametrize(sb):
27
25
class RepeatTestsWithPytest :
28
26
@pytest .mark .parametrize ("" , [[]] * 2 )
29
27
def test_repeat_test_with_pytest_parametrize (self , sb ):
30
- sb .page_load_strategy = "none"
31
28
sb .open ("seleniumbase.github.io" )
32
29
sb .click ('a[href="help_docs/customizing_test_runs/"]' )
33
30
sb .assert_text ("Command Line Options" , "h1" )
Original file line number Diff line number Diff line change @@ -14,20 +14,20 @@ click==8.1.3
14
14
ghp-import == 2.1.0
15
15
readme-renderer == 37.3
16
16
pymdown-extensions == 9.11
17
- importlib-metadata == 6.5 .0
17
+ importlib-metadata == 6.6 .0
18
18
pipdeptree == 2.7.0
19
19
bleach == 6.0.0
20
20
lunr == 0.6.2
21
21
nltk == 3.8.1
22
- tornado == 6.3
22
+ tornado == 6.3.1
23
23
watchdog == 3.0.0
24
24
cairocffi == 1.5.1
25
25
cairosvg == 2.7.0
26
26
cssselect2 == 0.7.0
27
27
tinycss2 == 1.2.1
28
28
defusedxml == 0.7.1
29
29
mkdocs == 1.4.2
30
- mkdocs-material == 9.1.6
30
+ mkdocs-material == 9.1.7
31
31
mkdocs-exclude-search == 0.6.5
32
32
mkdocs-simple-hooks == 0.1.5
33
33
mkdocs-material-extensions == 1.1.1
Original file line number Diff line number Diff line change 1
1
pip >= 21.3.1 ;python_version < "3.7"
2
- pip >= 23.1 ;python_version >= "3.7"
2
+ pip >= 23.1.1 ;python_version >= "3.7"
3
3
packaging >= 21.3 ;python_version < "3.7"
4
4
packaging >= 23.1 ;python_version >= "3.7"
5
5
setuptools >= 59.6.0 ;python_version < "3.7"
Original file line number Diff line number Diff line change 1
1
# seleniumbase package
2
- __version__ = "4.14.1 "
2
+ __version__ = "4.14.2 "
Original file line number Diff line number Diff line change 1
1
""" SeleniumBase Exceptions
2
2
NoSuchFileException => Called when self.assert_downloaded_file(...) fails.
3
+ NotConnectedException => Called when Internet is not reachable when needed.
3
4
NotUsingChromeException => Used by Chrome-only methods if not using Chrome.
4
5
NotUsingChromiumException => Used by Chromium-only methods if not Chromium.
5
6
OutOfScopeException => Used by BaseCase methods when setUp() is skipped.
@@ -13,6 +14,10 @@ class NoSuchFileException(Exception):
13
14
pass
14
15
15
16
17
+ class NotConnectedException (Exception ):
18
+ pass
19
+
20
+
16
21
class NotUsingChromeException (Exception ):
17
22
pass
18
23
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def test_anything(self):
61
61
from seleniumbase.__version__ import __version__
62
62
from seleniumbase.common import decorators
63
63
from seleniumbase.common.exceptions import (
64
+ NotConnectedException,
64
65
NotUsingChromeException,
65
66
NotUsingChromiumException,
66
67
OutOfScopeException,
@@ -249,12 +250,29 @@ def open(self, url):
249
250
or "ERR_CONNECTION_CLOSED" in e.msg
250
251
or "ERR_CONNECTION_RESET" in e.msg
251
252
or "ERR_NAME_NOT_RESOLVED" in e.msg
252
- or "ERR_INTERNET_DISCONNECTED" in e.msg
253
253
):
254
254
shared_utils.check_if_time_limit_exceeded()
255
255
self.__check_browser()
256
256
time.sleep(0.8)
257
257
self.driver.get(url)
258
+ elif (
259
+ "ERR_INTERNET_DISCONNECTED" in e.msg
260
+ or "neterror?e=dnsNotFound" in e.msg
261
+ ):
262
+ shared_utils.check_if_time_limit_exceeded()
263
+ self.__check_browser()
264
+ time.sleep(1.05)
265
+ try:
266
+ self.driver.get(url)
267
+ except Exception as e2:
268
+ if (
269
+ "ERR_INTERNET_DISCONNECTED" in e2.msg
270
+ or "neterror?e=dnsNotFound" in e2.msg
271
+ ):
272
+ message = "Internet unreachable!"
273
+ raise NotConnectedException(message)
274
+ else:
275
+ raise
258
276
elif "Timed out receiving message from renderer" in e.msg:
259
277
page_load_timeout = None
260
278
if selenium4_or_newer:
Original file line number Diff line number Diff line change 123
123
python_requires = ">=3.6" ,
124
124
install_requires = [
125
125
'pip>=21.3.1;python_version<"3.7"' ,
126
- 'pip>=23.1;python_version>="3.7"' ,
126
+ 'pip>=23.1.1 ;python_version>="3.7"' ,
127
127
'packaging>=21.3;python_version<"3.7"' ,
128
128
'packaging>=23.1;python_version>="3.7"' ,
129
129
'setuptools>=59.6.0;python_version<"3.7"' ,
You can’t perform that action at this time.
0 commit comments