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

[py] Fix abstract method in options class #8389

Merged
merged 3 commits into from
Jun 5, 2020
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
10 changes: 8 additions & 2 deletions py/selenium/webdriver/common/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class BaseOptions(object):
"""

def __init__(self):
super(BaseOptions, self).__init__()
self._caps = self.default_capabilities
self.set_capability("pageLoadStrategy", "normal")

Expand All @@ -40,12 +41,13 @@ def set_capability(self, name, value):

@abstractmethod
def to_capabilities(self):
return
"""Convert options into capabilities dictionary."""

@property
@abstractmethod
def default_capabilities(self):
return {}
"""Return minimal capabilities necessary as a dictionary."""



class ArgOptions(BaseOptions):
Expand Down Expand Up @@ -75,3 +77,7 @@ def add_argument(self, argument):

def to_capabilities(self):
return self._caps

@property
def default_capabilities(self):
return {}