README.rdoc in grope-0.0.4 vs README.rdoc in grope-0.1.1
- old
+ new
@@ -1,21 +1,32 @@
= grope
A non-GUI library to represent browser environment using WebKit Framework + RubyCocoa
-== Sypnosis
+== Synopsis
require 'grope'
env = Grope::Env.new
+=== Load URL
env.load('http://example.com')
env.document.title //=> "Example Web Page"
+
+=== Search by XPath
env.find('//a').href //=> "http://www.rfc-editor.org/rfc/rfc2606.txt"
env.find('//a').offsetWidth //=> 58
+=== Execute javascript
env.load('http://nonn-et-twk.net/twk/nondrupal/flip/flip.html')
env.window.flipString('test') //=> "ʇsǝʇ"
+
+=== Capture screenshot
+ # capture whole page and save to 'capture.png'
+ @env.capture
+
+ # capture specified element
+ @env.capture(@env.find('id("header")'), 'capture_header.png')
== Requirements
* RubyCocoa