Struct fantoccini::elements::Form[][src]

pub struct Form { /* fields omitted */ }
Expand description

An HTML form on the current page.

Implementations

Get back the Client hosting this Form.

Find a form input using the given locator and set its value to value.

Find a form input with the given name and set its value to value.

Submit this form using the first available submit button.

false is returned if no submit button was not found.

Submit this form using the button matched by the given selector.

false is returned if a matching button was not found.

Submit this form using the form submit button with the given label (case-insensitive).

false is returned if a matching button was not found.

Submit this form directly, without clicking any buttons.

This can be useful to bypass forms that perform various magic when the submit button is clicked, or that hijack click events altogether (yes, I’m looking at you online advertisement code).

Note that since no button is actually clicked, the name=value pair for the submit button will not be submitted. This can be circumvented by using submit_sneaky instead.

Submit this form directly, without clicking any buttons, and with an extra field.

Like submit_direct, this method will submit this form without clicking a submit button. However, it will also inject a hidden input element on the page that carries the given field=value mapping. This allows you to emulate the form data as it would have been if the submit button was indeed clicked.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.