Skip to content

Commit

Permalink
[py] update to w3c compliant log endpoints
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Tierney <lucast1533@gmail.com>
  • Loading branch information
lmtierney committed Aug 1, 2019
1 parent f81159f commit 15d8c41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions py/selenium/webdriver/remote/remote_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ def __init__(self, remote_server_addr, keep_alive=False, resolve_ip=None):
Command.GET_SESSION_STORAGE_SIZE:
('GET', '/session/$sessionId/session_storage/size'),
Command.GET_LOG:
('POST', '/session/$sessionId/log'),
('POST', '/session/$sessionId/se/log'),
Command.GET_AVAILABLE_LOG_TYPES:
('GET', '/session/$sessionId/log/types'),
('GET', '/session/$sessionId/se/log/types'),
Command.CURRENT_CONTEXT_HANDLE:
('GET', '/session/$sessionId/context'),
Command.CONTEXT_HANDLES:
Expand Down
4 changes: 2 additions & 2 deletions py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,14 +1306,14 @@ def application_cache(self):
@property
def log_types(self):
"""
Gets a list of the available log types
Gets a list of the available log types. This only works with w3c compliant browsers.
:Usage:
::
driver.log_types
"""
return self.execute(Command.GET_AVAILABLE_LOG_TYPES)['value']
return self.execute(Command.GET_AVAILABLE_LOG_TYPES)['value'] if self.w3c else []

def get_log(self, log_type):
"""
Expand Down

0 comments on commit 15d8c41

Please sign in to comment.