Input and forms
Host input uses the same trusted input dispatcher as the DevTools Protocol path:
csharp
await page.FillAsync("#email", "ada@example.org");
await page.TypeAsync("#search", "jint");
await page.PressAsync("Enter");
await page.ClickAsync("#save");
await page.SelectAsync("#country", "FR");
await page.HoverAsync("#menu");
await page.ScrollToAsync(800);Element targets can be CSS selectors or ref= values produced by an accessibility snapshot:
csharp
var snapshot = await page.AccessibilitySnapshotAsync(includeReferences: true);
await page.ClickAsync("ref=42");References belong to one document and stop resolving after navigation.
FillAsyncfocuses, selects all, and inserts one replacement.TypeAsyncpreserves the current value and dispatches keys one character at a time.PressAsynctargets the focused element, or the body when nothing is focused.ClickAsyncscrolls the target into view and runs link, button, checkbox, radio, label, summary, and option activation.SelectAsyncmatches an option by value, then by visible text, and firesinputfollowed bychange.
Methods that name an element return false when no suitable target exists.
SubmitFormAsync("#form") runs validation, submit, entry-list construction, formdata, and GET or POST submission. It returns null when nothing matched, validation failed, or submission was cancelled.
Input uses a deterministic synthetic box model, not visual layout. See Limitations.