File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
packages/browser-webdriverio/src Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,19 @@ export class WebdriverBrowserProvider implements BrowserProvider {
117117 if ( this . topLevelContext == null || ! this . browser ) {
118118 throw new Error ( `The browser has no open pages.` )
119119 }
120- await this . browser . send ( {
121- method : 'browsingContext.setViewport' ,
122- params : {
123- context : this . topLevelContext ,
124- devicePixelRatio : 1 ,
125- viewport : options ,
126- } ,
127- } )
120+ if ( this . browser . isBidi ) {
121+ await this . browser . send ( {
122+ method : 'browsingContext.setViewport' ,
123+ params : {
124+ context : this . topLevelContext ,
125+ devicePixelRatio : 1 ,
126+ viewport : options ,
127+ } ,
128+ } )
129+ }
130+ else {
131+ await this . browser . setWindowSize ( options . width , options . height )
132+ }
128133 }
129134
130135 getCommandsContext ( ) : {
You can’t perform that action at this time.
0 commit comments