examples/google_search.capy in capy-1.3.0 vs examples/google_search.capy in capy-1.4.0
- old
+ new
@@ -1,5 +1,6 @@
#!/usr/bin/env capy
-visit 'http://google.com/'
+visit 'http://google.co.jp/'
fill_in 'q', :with => 'ruby'
-page.evaluate_script("document.forms[0].submit()")
+js 'document.forms[0].submit()'
+puts js('document.getElementsByName("q")[0].value + "の検索結果: " + document.getElementById("resultStats").textContent')