Skip to content

Commit

Permalink
Moving ignore_local_proxy_environment_variables to BaseOptions (#13926)
Browse files Browse the repository at this point in the history
* Moving ignore_local_proxy_environment_variables to BaseOptions

* Just moving instead of deprecating

* Invoking method instead of property
  • Loading branch information
diemol authored May 13, 2024
1 parent df54f95 commit 4e59ac8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions py/selenium/webdriver/common/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def __init__(self) -> None:
self._proxy = None
self.set_capability("pageLoadStrategy", PageLoadStrategy.normal)
self.mobile_options = None
self._ignore_local_proxy = False

@property
def capabilities(self):
Expand Down Expand Up @@ -404,14 +405,18 @@ def to_capabilities(self):
def default_capabilities(self):
"""Return minimal capabilities necessary as a dictionary."""

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


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

def __init__(self) -> None:
super().__init__()
self._arguments = []
self._ignore_local_proxy = False

@property
def arguments(self):
Expand All @@ -432,7 +437,7 @@ def add_argument(self, argument) -> None:
def ignore_local_proxy_environment_variables(self) -> None:
"""By calling this you will ignore HTTP_PROXY and HTTPS_PROXY from
being picked up and used."""
self._ignore_local_proxy = True
super().ignore_local_proxy_environment_variables()

def to_capabilities(self):
return self._caps
Expand Down

0 comments on commit 4e59ac8

Please sign in to comment.