Skip to content

Commit 4e59ac8

Browse files
authored
Moving ignore_local_proxy_environment_variables to BaseOptions (#13926)
* Moving ignore_local_proxy_environment_variables to BaseOptions * Just moving instead of deprecating * Invoking method instead of property
1 parent df54f95 commit 4e59ac8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

py/selenium/webdriver/common/options.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ def __init__(self) -> None:
367367
self._proxy = None
368368
self.set_capability("pageLoadStrategy", PageLoadStrategy.normal)
369369
self.mobile_options = None
370+
self._ignore_local_proxy = False
370371

371372
@property
372373
def capabilities(self):
@@ -404,14 +405,18 @@ def to_capabilities(self):
404405
def default_capabilities(self):
405406
"""Return minimal capabilities necessary as a dictionary."""
406407

408+
def ignore_local_proxy_environment_variables(self) -> None:
409+
"""By calling this you will ignore HTTP_PROXY and HTTPS_PROXY from
410+
being picked up and used."""
411+
self._ignore_local_proxy = True
412+
407413

408414
class ArgOptions(BaseOptions):
409415
BINARY_LOCATION_ERROR = "Binary Location Must be a String"
410416

411417
def __init__(self) -> None:
412418
super().__init__()
413419
self._arguments = []
414-
self._ignore_local_proxy = False
415420

416421
@property
417422
def arguments(self):
@@ -432,7 +437,7 @@ def add_argument(self, argument) -> None:
432437
def ignore_local_proxy_environment_variables(self) -> None:
433438
"""By calling this you will ignore HTTP_PROXY and HTTPS_PROXY from
434439
being picked up and used."""
435-
self._ignore_local_proxy = True
440+
super().ignore_local_proxy_environment_variables()
436441

437442
def to_capabilities(self):
438443
return self._caps

0 commit comments

Comments
 (0)