Tabs & Windows

Close Window

Closes a browser window based on the current active window, a specified window ID, or a URL match within the window's tabs.

Examples

GPAL Fluent: High-level fluent C# API

browser.CloseWindow()

browser.CloseWindow(string url)

browser.CloseWindow(int tabId)

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.CloseWindow();

GPAL.MagicHelper.CloseWindow(string url);

GPAL.MagicHelper.CloseWindow(int tabId);

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.CloseWindow().Execute();

browser.PuppeteerClient.CloseWindow(string url).Execute();

browser.PuppeteerClient.CloseWindow(int tabId).Execute();

REST Client: Direct REST/HTTP client

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.CloseWindow).Execute();

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.CloseWindow).WithUrl(string url).Execute();

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.CloseWindow).WithTabId(int tabId).Execute();

💬 Ask GPAL