Skip to content

Instantly share code, notes, and snippets.

@jarib
Created April 16, 2012 14:27
Show Gist options
  • Save jarib/2399135 to your computer and use it in GitHub Desktop.
Save jarib/2399135 to your computer and use it in GitHub Desktop.
require 'watir-webdriver'
browser = Watir::Browser.new :ie
p browser.driver.capabilities
File.open("test.html", "w") { |file| file << DATA.read }
browser.goto "file://#{File.expand_path 'test.html'}"
browser.button(:name => "save").click
browser.close
puts "it worked"
__END__
<html>
<body>
<DIV align=left>
<INPUT class=pagesubmit onclick=\"document.input.command.value=this.name\" value=Save type=submit name=save>
</DIV>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment