import { Question } from '@serenity-js/core' ; import { promiseOf } from '../../promiseOf' ; import { BrowseTheWeb } from '../abilities' ; export class Window { desc returns { Question < Promise < { width : number , height : number } > > } static size ( ) { return Question . about ( `browser window size` , actor => promiseOf ( BrowseTheWeb . as ( actor ) . manage ( ) . window ( ) . getSize ( ) ) ) ; } desc returns { Question < Promise < { x : number , y : number } > > } static position ( ) { return Question . about ( `browser window position` , actor => promiseOf ( BrowseTheWeb . as ( actor ) . manage ( ) . window ( ) . getPosition ( ) ) ) ; } }