mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Strip script in Session rather than Selenium driver
This commit is contained in:
parent
e65182aad1
commit
9b834e7445
3 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
# Version 3.4.1
|
||||
Release date: unreleased
|
||||
|
||||
### Fixed
|
||||
|
||||
* `Session#evaluate_script` now strips the script in `Session` rather than only in the Selenium driver
|
||||
|
||||
# Version 3.4.0
|
||||
Release date: 2018-07-19
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
|
|||
end
|
||||
|
||||
def evaluate_script(script, *args)
|
||||
result = execute_script("return #{script.strip}", *args)
|
||||
result = execute_script("return #{script}", *args)
|
||||
unwrap_script_result(result)
|
||||
end
|
||||
|
||||
|
|
|
@ -580,7 +580,7 @@ module Capybara
|
|||
#
|
||||
def evaluate_script(script, *args)
|
||||
@touched = true
|
||||
result = driver.evaluate_script(script, *driver_args(args))
|
||||
result = driver.evaluate_script(script.strip, *driver_args(args))
|
||||
element_script_result(result)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue