Created
October 5, 2012 21:03
-
-
Save inkredabull/3842392 to your computer and use it in GitHub Desktop.
Use execute_script in conjunction with evaluate_script to flush JS global to STDOUT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Essentially from the poltergeist code (see 'spec/integration/driver_spec.rb') | |
page.execute_script("window.result = 3;") | |
puts page.evaluate_script("result") # '3' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment