Skip to content

Commit

Permalink
Use relative paths for commands to support Grid
Browse files Browse the repository at this point in the history
Closes #7174
  • Loading branch information
p0deje committed May 7, 2019
1 parent 94f2e09 commit fce41a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions rb/lib/selenium/webdriver/chrome/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ module Chrome
module Bridge

COMMANDS = {
get_network_conditions: [:get, '/session/:session_id/chromium/network_conditions'],
set_network_conditions: [:post, '/session/:session_id/chromium/network_conditions'],
send_command: [:post, '/session/:session_id/goog/cdp/execute']
get_network_conditions: [:get, 'session/:session_id/chromium/network_conditions'],
set_network_conditions: [:post, 'session/:session_id/chromium/network_conditions'],
send_command: [:post, 'session/:session_id/goog/cdp/execute']
}.freeze

def commands(command)
Expand Down
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/common/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def stop_server
return if process_exited?

connect_to_server do |http|
headers = WebDriver::Remote::Http::Common::DEFAULT_HEADERS.dup
headers = WebDriver::Remote::Http::Common::DEFAULT_HEADERS.dup
http.get('/shutdown', headers)
end
end
Expand Down
6 changes: 3 additions & 3 deletions rb/lib/selenium/webdriver/safari/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ module Bridge

# https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/WebDriverEndpointDoc/Commands/Commands.html
COMMANDS = {
get_permissions: [:get, '/session/:session_id/apple/permissions'],
set_permissions: [:post, '/session/:session_id/apple/permissions'],
attach_debugger: [:post, '/session/:session_id/apple/attach_debugger']
get_permissions: [:get, 'session/:session_id/apple/permissions'],
set_permissions: [:post, 'session/:session_id/apple/permissions'],
attach_debugger: [:post, 'session/:session_id/apple/attach_debugger']
}.freeze

def commands(command)
Expand Down

0 comments on commit fce41a9

Please sign in to comment.