RESTClient

Browser Navigation via REST

REST API methods for navigating the browser, managing tabs and windows, and controlling window size.

REST API methods for navigating the browser, managing tabs and windows, and controlling window size.

GoTo navigates the browser to the specified URL. Back, Forward, and Refresh mirror browser toolbar buttons. NewTab opens a new tab, CloseTab closes one, and NextTab/PreviousTab switch between them. GoToTab and CloseTab accept a URL or tab ID. Window management follows the same pattern: OpenWindow, CloseWindow, NextWindow, PreviousWindow, GoToWindow. Maximize, Minimize, Normal, Restore, and FullScreen control window state.

Examples

GPAL Fluent: High-level fluent C# API

//Each navigation method configures the request but does not send it until Execute() is called. The WithUrl and WithUrlFromResult parameter methods let you pass URLs derived from prior results in a chain.

// Navigate to a URL GPAL.RestClient .WithAPIBase("http://localhost:9222") .GoTo(GPAL.Url().ForUrl("https://example.com").ToGPALObject()) .Execute(); // Open a new tab GPAL.RestClient .WithAPIBase("http://localhost:9222") .NewTab(GPAL.Url().ForUrl("https://example.com/reports").ToGPALObject()) .Execute(); // Maximize the browser window GPAL.RestClient .WithAPIBase("http://localhost:9222") .Maximize() .Execute();