File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 5
5
NotUsingChromeException => Used by Chrome-only methods if not using Chrome.
6
6
NotUsingChromiumException => Used by Chromium-only methods if not Chromium.
7
7
OutOfScopeException => Used by BaseCase methods when setUp() is skipped.
8
+ ProxyConnectionException => Called when the proxy connection failed.
8
9
TextNotVisibleException => Called when expected text fails to appear.
9
10
TimeLimitExceededException => Called when exceeding "--time-limit=SECONDS".
10
11
TimeoutException => Called when some timeout limit has been exceeded.
@@ -36,6 +37,10 @@ class OutOfScopeException(Exception):
36
37
pass
37
38
38
39
40
+ class ProxyConnectionException (Exception ):
41
+ pass
42
+
43
+
39
44
class TextNotVisibleException (Exception ):
40
45
pass
41
46
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ def test_anything(self):
65
65
NotConnectedException,
66
66
NotUsingChromeException,
67
67
NotUsingChromiumException,
68
+ ProxyConnectionException,
68
69
OutOfScopeException,
69
70
VisualException,
70
71
)
@@ -261,6 +262,7 @@ def open(self, url):
261
262
elif (
262
263
"ERR_INTERNET_DISCONNECTED" in e.msg
263
264
or "neterror?e=dnsNotFound" in e.msg
265
+ or "ERR_PROXY_CONNECTION_FAILED" in e.msg
264
266
):
265
267
shared_utils.check_if_time_limit_exceeded()
266
268
self.__check_browser()
@@ -272,8 +274,13 @@ def open(self, url):
272
274
"ERR_INTERNET_DISCONNECTED" in e2.msg
273
275
or "neterror?e=dnsNotFound" in e2.msg
274
276
):
275
- message = "Internet unreachable!"
277
+ message = "ERR_INTERNET_DISCONNECTED: "
278
+ message += "Internet unreachable!"
276
279
raise NotConnectedException(message)
280
+ elif "ERR_PROXY_CONNECTION_FAILED" in e2.msg:
281
+ message = "ERR_PROXY_CONNECTION_FAILED: "
282
+ message += "Internet unreachable and/or invalid proxy!"
283
+ raise ProxyConnectionException(message)
277
284
else:
278
285
raise
279
286
elif "Timed out receiving message from renderer" in e.msg:
You can’t perform that action at this time.
0 commit comments