title: Watir::Safari js eval equivalent?
body: <p>I've seen and tried many incantations of js eval in the various Watir's out there. firewatir for ffox, as well as safariwatir. In firefox, I got things working but need Safari as my project is webkit based. For example, in the firefox version I can do stuff like:</p>
  
  <pre><code>@browser.document.parentWindow.eval('window.resizeTo(800,600)')
  </code></pre>
  
  <p>In any event, my question is there any equivalent to js_eval, execute_script, or access to document and/or window objects from the Watir::Safari object? I would like to do things like clear the local storage, etc.</p>
  
  <p>EDIT:</p>
  
  <p>Went ahead and used watir-webdriver</p>
  
  <pre><code>require "rubygems"
  require "watir-webdriver"
  
  #browser = Watir::Browser.new :ie
  #browser = Watir::Browser.new :firefox
  @browser = Watir::Browser.new :chrome
  @browser.goto "http://google.com"
  @browser.text_field(:name, 'q').set "watir-webdriver"
  @browser.button(:name, 'btnG').click
  @browser.div(:id =&gt; "resultStats").wait_until_present
  puts "Displaying page: '#{@browser.title}' with results: '#{@browser.div(:id =&gt; "resultStats").text}'"
  @browser.execute_script('alert("hi");')
  </code></pre>