docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
A utility that controls browser window positioning and sizing.
/**
* Creates a new browser window controller instance.
*
* @returns {Promise<WindowController>} A window controller instance
*/
async function createWindowController() {
// IMPLEMENTATION HERE
}
/**
* WindowController class that provides methods to control browser window bounds.
*/
class WindowController {
/**
* Gets the current window bounds (position and size).
*
* @returns {Promise<{left: number, top: number, width: number, height: number}>} The current window bounds
*/
async getWindowBounds() {
// IMPLEMENTATION HERE
}
/**
* Sets the window position to the specified coordinates.
*
* @param {number} x - The x-coordinate in pixels
* @param {number} y - The y-coordinate in pixels
* @returns {Promise<void>}
*/
async setWindowPosition(x, y) {
// IMPLEMENTATION HERE
}
/**
* Sets the window size to the specified dimensions.
*
* @param {number} width - The window width in pixels
* @param {number} height - The window height in pixels
* @returns {Promise<void>}
*/
async setWindowSize(width, height) {
// IMPLEMENTATION HERE
}
/**
* Closes the browser and cleans up resources.
*
* @returns {Promise<void>}
*/
async close() {
// IMPLEMENTATION HERE
}
}
module.exports = {
createWindowController,
WindowController
};Provides browser automation capabilities including window bounds management.