Home > assistive-playwright-client > CalibrationResult
Result of the calibration, returned by playwrightCalibrate(), and allowing to translate coordinates relative to the top-left corner of the viewport, or coordinates relative to the center of a DOM element into screen coordinates.
Signature:
export declare class CalibrationResult implements ScreenPosition
Implements: ScreenPosition
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(x, y, screenWidth, screenHeight, vm, frame) | Creates an instance of CalibrationError, containing the coordinates of the viewport inside the browser window. An object of this class is returned by playwrightCalibrate() if the calibration succeeds. |
| Property | Modifiers | Type | Description |
|---|---|---|---|
| frame | Page | Frame | Reference to the playwright frame object. | |
| screenHeight | number | Height of the screen in pixels. | |
| screenWidth | number | Width of the screen in pixels. | |
| vm | VM | Reference to the virtual machine. | |
| x | number | Horizontal coordinate of the viewport inside the browser window. | |
| y | number | Vertical coordinate of the viewport inside the browser window. |
| Method | Modifiers | Description |
|---|---|---|
| translateCoordinates(position, origin) | Translates viewport coordinates or coordinates relative to the center of a DOM element into screen coordinates. |