1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Fix a Ruby 2.7 deprecation warning.

The selenium execute_cdp method takes keyword arguments,
so params should be passed with a doublesplat.
This commit is contained in:
Connor Shea 2019-12-26 18:27:42 -07:00
parent a392f8950e
commit 118b3e4414
No known key found for this signature in database
GPG key ID: 7FF97FB48289A157

View file

@ -96,7 +96,7 @@ private
def execute_cdp(cmd, params = {})
if browser.respond_to? :execute_cdp
browser.execute_cdp(cmd, params)
browser.execute_cdp(cmd, **params)
else
args = { cmd: cmd, params: params }
result = bridge.http.call(:post, "session/#{bridge.session_id}/goog/cdp/execute", args)