irb(main):009:0> query("webview css:'input'")[ [0] { "class" => "", "nodeType" => "ELEMENT_NODE", "id" => "", "calSavedIndex" => 0, "html" => "<input name=\"foo\" type=\"tel\" autocomplete=\"off\">", "textContent" => "", "rect" => { "y" => 564, "x" => 108, "center_x" => 540, "height" => 150, "width" => 864, "top" => 104, "left" => 36, "center_y" => 639 }, "nodeName" => "INPUT", "webView" => nil }]
[0] { "error" => "No key for textCOntent. Keys: [class, nodeType, id, calSavedIndex, textContent, html, rect, nodeName, webView]", "receiverClass" => "java.util.HashMap", "receiverString" => "{class=, nodeType=ELEMENT_NODE, id=, calSavedIndex=0, textContent=, html=<input name=\"foo\" type=\"tel\" autocomplete=\"off\">, rect={y=564, x=108, center_x=540, height=150, width=864, top=104, left=36, center_y=639}, nodeName=INPUT, webView=null}", "methodName" => "textCOntent" }
irb(main):032:0> query("webview css:'input'", :method_name=>'getValue')[ [0] { "error" => "No such method found: method_name([String])", "receiverClass" => "java.util.HashMap", "receiverString" => "{class=, nodeType=ELEMENT_NODE, id=, calSavedIndex=0, textContent=, html=<input name=\"foo\" type=\"tel\" autocomplete=\"off\">, rect={y=564, x=108, center_x=540, height=150, width=864, top=104, left=36, center_y=639}, nodeName=INPUT, webView=null}", "methodName" => "method_name" }]
> javascript = "document.getElementsByTagName('h1').toString()"
> query("UIWebView", {calabashStringByEvaluatingJavaScript: javascript})
[
[0] "[object NodeList]"
]
Have you seen the examples and the API docs on the wiki?