Browser

Tabs and Windows

Tabs can be opened with NewTab, closed with CloseTab, and navigated with NextTab, PreviousTab, and GoToTab. Windows can be opened with OpenWindow, closed with CloseWindow, and navigated with NextWindow, PreviousWindow, and GoToWindow. Window size is controlled with Maximize, Minimize, Restore, and FullScreen - all are properties that execute immediately when accessed.

Examples

GPAL Fluent: High-level fluent C# API

//Maximize, Minimize, Restore, and FullScreen are properties, not methods - access them without parentheses. GoToTab and CloseTab accept either a URL string or a numeric tab index.

// Open a second tab and work in both

GPAL.Browser

.GoTo("https://site.com/login")

.WithSelector("#user")

.FillInFrom("admin")

.NewTab("https://site.com/dashboard")

.PreviousTab()

.WithSelector("#submit")

.LeftClick();


// Maximize before working

GPAL.Browser

.GoTo("https://example.com")

.Maximize

.WithSelector(".data-table")

.GetGrid(out var grid);

💬 Ask GPAL