Created
October 28, 2009 09:22
-
-
Save jarib/220368 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The format of the args argument is that it is an array containing, in the order passed to the function, wrapped arguments. The form of wrapped arguments is: | |
wrap("string") = {"type": "STRING", value: "string"} | |
wrap(true) = {"type": "BOOLEAN", value: true} | |
wrap(7) = {"type": "NUMBER", value: 7} | |
wrap(7.1) = {"type": "NUMBER", value: 7.1} | |
wrap(WebElement with ID 1) = {"type": "ELEMENT", value: "1"} | |
wrap([foo, bar]) = [wrap(foo), wrap(bar)] | |
The format of the response is that the value field will contain either an array of maps, or a map. The form of the response will be: | |
{"type": "NULL"} => return Nil | |
{"type": "VALUE", "value": foo} => return the parse of foo, which may be a number, string, or boolean | |
{"type": "ELEMENT", "value": "7"} => return the element with ID 7 | |
{"type": "POINT", "x": 6, "y": 10} => return a point with the relevant x and y (I'm not sure what Ruby does point-wise) | |
{"type": "DIMENSION", "width": 6, "height": 10} => return a dimension with the relevant width and height (I'm not sure what Ruby does point-wise) | |
{"type": "COOKIE", "name": "id", "value": "dwh"} => return a cookie with the relevant name and value set, with unknown domain, path, expiry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment