Scripting example on how to handle HTML forms.
In many cases using the Selection API (jQuery API clone) to interact with HTML data is enough, but for some use cases, like with forms, we can make things easier providing a higher-level API like the Response.submitForm( [params] ) API.
submit-form.js
Relevant k6 APIs:
- Response.submitForm([params])
- Selection.find(selector) (the jQuery Selector API docs are also a good resource on what possible selector queries can be made)