@@ -464,6 +464,75 @@ For example, [html-reporter][html-reporter] adds `gui` command.
464464testplane list-tests --help
465465` ` `
466466
467+ # # `list-browsers` command
468+
469+ Command to get all browsers from the config.
470+
471+ ` ` ` bash
472+ > npx testplane list-browsers --help
473+
474+ Usage: list-browsers [options]
475+
476+ Lists all browsers from the config
477+
478+ Options:
479+
480+ --type [type] return browsers in specified type (' tags' : browserName and browserVersion, ' ids' : browserId from config) (default: tags)
481+ --format [format] return browsers in specified format (' json' / ' plain' ) (default: json)
482+ -h, --help output usage information
483+ ` ` `
484+
485+ For example,
486+
487+ ` ` `
488+ npx testplane list-browsers --type ids --format plain
489+ ` ` `
490+
491+ # ## Options {#list-browsers-options}
492+
493+ # ### Type {#list-browsers-type}
494+
495+ Specify type of output data: browserId from config or browserName with browserVersion.
496+
497+ ` ` ` bash
498+ testplane list-browsers --type tags
499+ ` ` `
500+
501+ # ### Format {#list-browsers-format}
502+
503+ Specify format of output data: plain text or json.
504+
505+ ` ` ` bash
506+ testplane list-browsers --format json
507+ ` ` `
508+
509+ # ### Example {#list-browsers-example}
510+
511+ If you have the following " browsers" section in your [Testplane config](/docs/v8/config/main):
512+
513+ ` ` ` json
514+ {
515+ " my-chrome" : { " desiredCapabilities" : { " browserName" : " chrome" , " browserVersion" : " 130.0" } },
516+ " my-safari" : { " desiredCapabilities" : { " browserName" : " safari" } }
517+ }
518+ ` ` `
519+
520+ The following commands will provide corresponding result:
521+ | Command | Result |
522+ | :--------------------------------------------------:| :----------------------------------------------------------------------------:|
523+ | ` testplane list-browsers --type ids --format plain` | ` my-chrome my-safari` |
524+ | ` testplane list-browsers --type ids --format json` | ` [" my-chrome" ," my-safari" ]` |
525+ | ` testplane list-browsers --type tags --format plain` | ` [email protected] safari` | 526+ | ` testplane list-browsers --type tags --format json` | ` [{" browserName" :" chrome" ," browserVersion" :" 130.0" },{" browserName" :" safari" }]` |
527+
528+ # ### Help {#list-browsers-help}
529+
530+ Prints out information about the command and its options.
531+
532+ ` ` ` bash
533+ testplane list-browsers --help
534+ ` ` `
535+
467536# # `install-deps` command {#install-deps}
468537
469538This command is a part of the guide [How to launch Testplane in the local browser](/docs/v8/guides/local-browsers).
0 commit comments