Browser

Form Data Entry

Methods for filling in form inputs from data sources - overwriting, appending, or inserting content from strings, files, databases, or grids.

Methods for filling in form inputs from data sources - overwriting, appending, or inserting content from strings, files, databases, or grids.

FillInFrom overwrites the current value of the matched input with data from the source. AppendFrom adds data to the end of the current input value. InsertFrom places data at the beginning. All three accept a string, GPALFile, GPALDatabase, or IGPALGrid<string>. SetRange sets the value of a range/slider input. When used with a grid data source, GPAL iterates through rows - each row of data fills the next matched element.

TIP

When the data source is a grid or database, each row in the source corresponds to one execution of the unit of work. Use CallAfterFillIn to run custom logic after each row is processed.

Examples

GPAL Fluent: High-level fluent C# API

//FillInFrom, AppendFrom, and InsertFrom each return the same Browser instance for chaining. When using a grid source, GPAL automatically iterates through all rows.

// Fill a single input from a string GPAL.Browser .GoTo("https://example.com/login") .WithSelector("#username") .FillInFrom("admin") .WithSelector("#password") .FillInFrom("secret"); // Fill multiple inputs from a grid (one row per submit cycle) var data = GPAL.Grid.ToGPALObject(); // ... populate data grid ... GPAL.Browser .GoTo("https://example.com/form") .WithSelector("#name") .FillInFrom(data) .WithSelector("#email") .AppendFrom(" - verified");