Skip to content

Commit

Permalink
Fix abstract method in options class (#8389)
Browse files Browse the repository at this point in the history
Co-authored-by: David Burns <david.burns@theautomatedtester.co.uk>
  • Loading branch information
isaulv and AutomatedTester committed Jun 5, 2020
1 parent 8ee7f30 commit 90e3cc5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions py/selenium/webdriver/common/options.py
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 {}

0 comments on commit 90e3cc5

Please sign in to comment.