(script string, args []interface{}, suffix string)
| 1115 | } |
| 1116 | |
| 1117 | func (wd *remoteWD) execScriptRaw(script string, args []interface{}, suffix string) ([]byte, error) { |
| 1118 | if args == nil { |
| 1119 | args = make([]interface{}, 0) |
| 1120 | } |
| 1121 | |
| 1122 | data, err := json.Marshal(map[string]interface{}{ |
| 1123 | "script": script, |
| 1124 | "args": args, |
| 1125 | }) |
| 1126 | if err != nil { |
| 1127 | return nil, err |
| 1128 | } |
| 1129 | |
| 1130 | return wd.execute("POST", wd.requestURL("/session/%s/execute"+suffix, wd.id), data) |
| 1131 | } |
| 1132 | |
| 1133 | func (wd *remoteWD) execScript(script string, args []interface{}, suffix string) (interface{}, error) { |
| 1134 | response, err := wd.execScriptRaw(script, args, suffix) |
no test coverage detected