Window & Viewport

Window Screen Top

Returns the vertical distance in pixels from the top edge of the users screen to the top edge of the browser window using window.screenTop.

Examples

GPAL Fluent: High-level fluent C# API

//There is no fluent call for this one value. GetWindowRectangle answers with the whole window in screen coordinates on every engine, and Y is this measurement. The single reads below are the engine layers underneath it.

browser.GetWindowRectangle(out Rectangle window);


int value = window.Y;

MagicHelper: MagicHelper utility library

browser.MagicHelper.WindowScreenTop();

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.WindowScreenTop().Execute<int>();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.WindowScreenTop(string sessionId);

REST Client: Direct REST/HTTP client

browser.OttoMagicClient.WithEndpoint(ApiEndpoint.WindowScreenTop).Execute();

💬 Ask GPAL