submit(selector)
This is a TDK feature
This is not supported in Testim's visual editor
This method submits the given form element.
selector
{string | TDKStepLocator} a CSS selector or smart locator for the element- returns: Promise that fulfills when the action is complete or throws if the form is not found or the passed element is not a form.
// ✅ submit the given `form`
await submit('form');
// ✅ submit the given form by smart locator
await submit(l('.login-form'));
// ❌ need to pass the form
await submit();
// ❌ does not take options
await submit({ x: 15, y: 20});
Updated almost 3 years ago