@@ -54,7 +54,7 @@ export class Keyboard {
5454 }
5555
5656 async apiDown ( progress : Progress , key : string ) {
57- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata ) ) ;
57+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page ) ;
5858 await this . down ( progress , key ) ;
5959 }
6060
@@ -82,7 +82,7 @@ export class Keyboard {
8282 }
8383
8484 async apiUp ( progress : Progress , key : string ) {
85- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata ) ) ;
85+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page ) ;
8686 await this . up ( progress , key ) ;
8787 }
8888
@@ -95,7 +95,7 @@ export class Keyboard {
9595 }
9696
9797 async apiInsertText ( progress : Progress , text : string ) {
98- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata ) ) ;
98+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page ) ;
9999 await this . insertText ( progress , text ) ;
100100 }
101101
@@ -104,7 +104,7 @@ export class Keyboard {
104104 }
105105
106106 async apiType ( progress : Progress , text : string , options ?: { delay ?: number } ) {
107- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata ) ) ;
107+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page ) ;
108108 await this . type ( progress , text , options ) ;
109109 }
110110
@@ -122,7 +122,7 @@ export class Keyboard {
122122 }
123123
124124 async apiPress ( progress : Progress , key : string , options : { delay ?: number } = { } ) {
125- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata ) ) ;
125+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page ) ;
126126 await this . press ( progress , key , options ) ;
127127 }
128128
@@ -214,7 +214,7 @@ export class Mouse {
214214 }
215215
216216 async apiMove ( progress : Progress , x : number , y : number , options : { steps ?: number , forClick ?: boolean } = { } ) {
217- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata , { x, y } ) ) ;
217+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page , { x, y } ) ;
218218 await this . move ( progress , x , y , options ) ;
219219 }
220220
@@ -232,7 +232,7 @@ export class Mouse {
232232 }
233233
234234 async apiDown ( progress : Progress , options : { button ?: types . MouseButton , clickCount ?: number } = { } ) {
235- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata , this . _currentPoint ( ) ) ) ;
235+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page , this . _currentPoint ( ) ) ;
236236 await this . down ( progress , options ) ;
237237 }
238238
@@ -244,7 +244,7 @@ export class Mouse {
244244 }
245245
246246 async apiUp ( progress : Progress , options : { button ?: types . MouseButton , clickCount ?: number } = { } ) {
247- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata , this . _currentPoint ( ) ) ) ;
247+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page , this . _currentPoint ( ) ) ;
248248 await this . up ( progress , options ) ;
249249 }
250250
@@ -256,7 +256,7 @@ export class Mouse {
256256 }
257257
258258 async apiClick ( progress : Progress , x : number , y : number , options : { delay ?: number , button ?: types . MouseButton , clickCount ?: number , steps ?: number } = { } ) {
259- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata , { x, y } ) ) ;
259+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page , { x, y } ) ;
260260 await this . click ( progress , x , y , options ) ;
261261 }
262262
@@ -289,7 +289,7 @@ export class Mouse {
289289 }
290290
291291 async apiWheel ( progress : Progress , deltaX : number , deltaY : number ) {
292- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata ) ) ;
292+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page ) ;
293293 await this . _raw . wheel ( progress , this . _x , this . _y , this . _buttons , this . _keyboard . _modifiers ( ) , deltaX , deltaY ) ;
294294 }
295295}
@@ -370,7 +370,7 @@ export class Touchscreen {
370370 async apiTap ( progress : Progress , x : number , y : number ) {
371371 if ( ! this . _page . browserContext . _options . hasTouch )
372372 throw new Error ( 'hasTouch must be enabled on the browser context before using the touchscreen.' ) ;
373- await progress . race ( this . _page . instrumentation . onBeforeInputAction ( this . _page , progress . metadata , { x, y } ) ) ;
373+ await this . _page . instrumentation . onBeforeInputAction ( progress , this . _page , { x, y } ) ;
374374 await this . tap ( progress , x , y ) ;
375375 }
376376
0 commit comments