Skip to content
Closed
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion py/selenium/webdriver/support/event_firing_webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def after_navigate_to(self, url, driver):
if not isinstance(event_listener, AbstractEventListener):
raise WebDriverException("Event listener must be a subclass of AbstractEventListener")
self._driver = driver
self._driver._wrap_value = self._wrap_value
self._original_wrap_value = getattr(self._driver, "_wrap_value", None)
setattr(self._driver, "_wrap_value", self._wrap_value)
self._listener = event_listener

@property
Expand Down
14 changes: 8 additions & 6 deletions py/selenium/webdriver/webkitgtk/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from selenium.webdriver.common import service

DEFAULT_EXECUTABLE_PATH: str = shutil.which("WebKitWebDriver")
DEFAULT_EXECUTABLE_PATH: Optional[str] = shutil.which("WebKitWebDriver")


class Service(service.Service):
Expand All @@ -40,7 +40,7 @@ class Service(service.Service):

def __init__(
self,
executable_path: str = DEFAULT_EXECUTABLE_PATH,
executable_path: Optional[str] = DEFAULT_EXECUTABLE_PATH,
port: int = 0,
log_path: Optional[str] = None,
log_output: Optional[str] = None,
Expand All @@ -49,15 +49,17 @@ def __init__(
**kwargs,
) -> None:
self._service_args = list(service_args or [])
log_file = None
output_file = None
if log_path is not None:
warnings.warn("log_path is deprecated, use log_output instead", DeprecationWarning, stacklevel=2)
log_path = open(log_path, "wb")
log_output = open(log_output, "wb") if log_output else None

log_file = open(log_path, "wb")
if log_output:
output_file = open(log_output, "wb")
super().__init__(
executable_path=executable_path,
port=port,
log_output=log_path or log_output,
log_output=log_file or output_file,
env=env,
**kwargs,
)
Expand Down
2 changes: 1 addition & 1 deletion py/selenium/webdriver/wpewebkit/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Service(service.Service):

def __init__(
self,
executable_path: str = DEFAULT_EXECUTABLE_PATH,
executable_path: Optional[str] = DEFAULT_EXECUTABLE_PATH,
port: int = 0,
log_output: Optional[str] = None,
service_args: Optional[Sequence[str]] = None,
Expand Down