Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving ignore_local_proxy_environment_variables to BaseOptions #13926

Merged
merged 4 commits into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading