@@ -21,32 +21,33 @@ function formatElapsedTime() {
2121 return `${ numberFormatter . format ( ( performance . now ( ) - startTime ) / 1000 ) } s` ;
2222}
2323
24- const yargsInput = yargs ( hideBin ( process . argv ) )
25- . option ( 'example-urls' , {
26- string : true ,
27- type : 'array' ,
28- demandOption : true ,
29- } )
30- . option ( 'parallel' , {
31- boolean : true ,
32- default : true ,
33- } )
34- . option ( 'times' , {
35- describe : 'How many times do you want to run an example?' ,
36- number : true ,
37- default : 1 ,
38- } )
39- . option ( 'label' , { string : true , default : 'run' } )
40- . option ( 'include-follow-up' , {
41- boolean : true ,
42- default : false ,
43- } )
44- . option ( 'test-target' , {
45- describe : 'Which panel do you want to run the examples against?' ,
46- choices : [ 'elements' , 'performance-main-thread' , 'performance-insights' ] ,
47- demandOption : true ,
48- } )
49- . parseSync ( ) ;
24+ const yargsInput =
25+ yargs ( hideBin ( process . argv ) )
26+ . option ( 'example-urls' , {
27+ string : true ,
28+ type : 'array' ,
29+ demandOption : true ,
30+ } )
31+ . option ( 'parallel' , {
32+ boolean : true ,
33+ default : true ,
34+ } )
35+ . option ( 'times' , {
36+ describe : 'How many times do you want to run an example?' ,
37+ number : true ,
38+ default : 1 ,
39+ } )
40+ . option ( 'label' , { string : true , default : 'run' } )
41+ . option ( 'include-follow-up' , {
42+ boolean : true ,
43+ default : false ,
44+ } )
45+ . option ( 'test-target' , {
46+ describe : 'Which panel do you want to run the examples against?' ,
47+ choices : [ 'elements' , 'performance-main-thread' , 'performance-insights' , 'elements-multimodal' ] ,
48+ demandOption : true ,
49+ } )
50+ . parseSync ( ) ;
5051
5152// Map the args to a more accurate interface for better type safety.
5253const userArgs = /** @type {import('./types.d.ts').YargsInput } **/ ( yargsInput ) ;
@@ -409,7 +410,7 @@ class Example {
409410 await devtoolsPage . keyboard . press ( 'Escape' ) ;
410411 await devtoolsPage . keyboard . press ( 'Escape' ) ;
411412
412- if ( userArgs . testTarget === 'elements' ) {
413+ if ( userArgs . testTarget === 'elements' || userArgs . testTarget === 'elements-multimodal' ) {
413414 await devtoolsPage . locator ( ':scope >>> #tab-elements' ) . setTimeout ( 5000 ) . click ( ) ;
414415 this . log ( '[Info]: Opened Elements panel' ) ;
415416
@@ -513,6 +514,7 @@ class Example {
513514 #getLocator( ) {
514515 switch ( userArgs . testTarget ) {
515516 case 'elements' :
517+ case 'elements-multimodal' :
516518 return 'aria/Ask a question about the selected element' ;
517519 case 'performance-main-thread' :
518520 return 'aria/Ask a question about the selected item and its call tree' ;
@@ -551,6 +553,10 @@ class Example {
551553 }
552554 const devtoolsPage = this . #devtoolsPage;
553555
556+ if ( userArgs . testTarget === 'elements-multimodal' ) {
557+ await devtoolsPage . locator ( 'aria/Take screenshot' ) . click ( ) ;
558+ }
559+
554560 const inputSelector = this . #getLocator( ) ;
555561 await devtoolsPage . locator ( inputSelector ) . click ( ) ;
556562 await devtoolsPage . locator ( inputSelector ) . fill ( query ) ;
0 commit comments