Back to all steps
Execute JS and send result
Step fields
1
selector
(text)
2
http://mysite.com/post
(url)
In a scenario, fields are joined with
|.Run a JS snippet and POST its result. Format: js|url.
Example: document.title|https://myapi.com/titles
Example: document.title|https://myapi.com/titles
Usage example
Run JS and send the result via a POST request.
Format: js|url
Examples:
document.title|https://myapi.com/titlesdocument.querySelectorAll(".product").length|https://myapi.com/counts
POST request: the JS result arrives in the html field (cast to a string).
Receiving example (PHP): $_POST["html"]