1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[17166],{22002:(e,n,r)=>{r.d(n,{R:()=>a,x:()=>i});var o=r(7378);const s={},t=o.createContext(s);function a(e){const n=o.useContext(t);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(t.Provider,{value:n},e.children)}},26139:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>E,frontMatter:()=>a,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"flowcharts/wdiocommands","title":"WDIO Commands","description":"This flowchart provides a high level overview of the @wdio/cli run, repl, config and install commands.","source":"@site/docs/flowcharts/WDIOCommands.md","sourceDirName":"flowcharts","slug":"/flowcharts/wdiocommands","permalink":"/docs/flowcharts/wdiocommands","draft":false,"unlisted":false,"editUrl":"https://github.com/webdriverio/webdriverio/edit/main/website/docs/flowcharts/WDIOCommands.md","tags":[],"version":"current","frontMatter":{"id":"wdiocommands","title":"WDIO Commands"},"sidebar":"flowcharts","next":{"title":"Create worker process","permalink":"/docs/flowcharts/createlocalworkerprocess"}}');var s=r(86106),t=r(22002);const a={id:"wdiocommands",title:"WDIO Commands"},i=void 0,c={},l=[{value:"Parse CLI args",id:"parse-cli-args",level:2},{value:"The <code>run</code> command",id:"the-run-command",level:2},{value:"The <code>repl</code>, <code>install</code>, and <code>config</code> commands",id:"the-repl-install-and-config-commands",level:2}];function d(e){const n={code:"code",h2:"h2",mermaid:"mermaid",p:"p",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"This flowchart provides a high level overview of the @wdio/cli run, repl, config and install commands."}),"\n",(0,s.jsx)(n.h2,{id:"parse-cli-args",children:"Parse CLI args"}),"\n",(0,s.jsx)(n.mermaid,{value:'graph TD\n STARTWDIO(Execute wdio or wdio run)--\x3e\n PARSECLIARGS[Parse CLI args]\n PARSECLIARGS--\x3eHELPSWITCH["wdio command --help"]--\x3e\n COMMANDINCLUDED{"Command<br>included?"}\n COMMANDINCLUDED--\x3e|Yes|PRINTCMDHELP[Print command help text]\n COMMANDINCLUDED--\x3e|No|PRINTWDIOHELP[Print wdio help]\n PARSECLIARGS--\x3eCONFIGCMD[config]--\x3e\n RUNCONFIG[Run config<br>command code]\n PARSECLIARGS--\x3eREPL[repl]--\x3e\n RUNREPL[Run repl<br>command code]\n PARSECLIARGS--\x3eINSTALL[install]--\x3e\n RUNINSTALL[Run install code]\n PARSECLIARGS--\x3eRUN[run]--\x3e\n LAUNCHRUNNER[Launch test runner]'}),"\n",(0,s.jsxs)(n.h2,{id:"the-run-command",children:["The ",(0,s.jsx)(n.code,{children:"run"})," command"]}),"\n",(0,s.jsx)(n.mermaid,{value:'graph TD\n CALLRUN("Launch test runner by calling the @wdio/cli:index run()")--\x3e\n LAUNCHTESTRUNNER2[Test runner is launched]--\x3e\n CALLRUNCMDHANDLER("Call @wdio/cli/commands:run launcher()")--\x3e\n INSTANTIATELAUNCHER["Creates @wdio/cli:launcher instance<br>1) Set log level<br>2) Worker count equals number<br>of specs * caps array length<br>3)Create a new runnner instance<br>using @wdio/utils:initializePlugin<br>4. Create CLI Interface instance.<br>5. Setup interface job:start,<br>job:end event listeners"]--\x3e\n CALLLAUNCHERINSTANCERUN["@wdio/cli:launcher run()"]--\x3e\n INITLAUNCHERINSTANCE["Create instance of all services<br>listed in the config services property."] --\x3e\n INIT["Call the runner initialize() method"]--\x3e\n RUNPRETSTTASKS["Run pre-test tasks for runner plugins"]--\x3e\n CONFIGONPREPAREHOOK["wdio.conf.js onPrepare hook"]--\x3e\n SERVICESONPREPAREHOOK["Run the services onPrepare hook<br>e.g. start selenium server."]--\x3e\n RUNMODE("Call @wdio/cli:launcher runMode()")--\x3e\n RUNMODEPROMISERESOLVED{"runMode() promise resolve?"}\n RUNMODEPROMISERESOLVED--\x3e|No|SCHEDULE["In @wdio/cli:launcher runMode()<br>create a spec execution schedule."]--\x3e\n RUNSPECS["Start test execution by calling<br>@wdio/cli:launcher runSpecs()."]--\x3e\n CREATEWORKERS["Create a new test instance (worker process) by<br>calling @wdio/cli:launcher runSpecs().<br> <br>Call @wdio/cli:launcher startInstance()<br>to create a new worker instance.<br> <br>See Create Worker Process and Test<br>Execution flowcharts for<br>more information on this process."]--\x3e\n ISNUMBERINSTANCESSPECSZERO{"Is
1number of worker<br>processes less than<br> config maxInstances?"}\n ISNUMBERINSTANCESSPECSZERO--\x3e|Yes|CREATEWORKERS\n ISNUMBERINSTANCESSPECSZERO--\x3e|No|SCHEDULELOOP["When number of running instances and<br>number of specs is zero, exit runSpecs()."]--\x3eENDRUNMODE\n RUNMODEPROMISERESOLVED--\x3e|Yes|ENDRUNMODE["Pass control back to<br>@wdio/cli:launcher run()."]--\x3e\n ONCOMPLETEHOOKS[Run service and config onComplete hooks.]--\x3e\n INTERFACEFINALISE["Call @wdio/cli interface.js finalise() method. This method prints the test results<br>and summary using data from the repoter packages."]--\x3e\n EXIT(Shutdown runner, end test process.)'}),"\n",(0,s.jsxs)(n.h2,{id:"the-repl-install-and-config-commands",children:["The ",(0,s.jsx)(n.code,{children:"repl"}),", ",(0,s.jsx)(n.code,{children:"install"}),", and ",(0,s.jsx)(n.code,{children:"config"})," commands"]}),"\n",(0,s.jsx)(n.mermaid,{value:'graph TD\n INSTALLCOMMAND[install]--\x3e\n TYPENAMESUPPORTED{Is type and name<br>supported?}\n TYPENAMESUPPORTED--\x3e|No|ERROR[Throw error message]\n TYPENAMESUPPORTED--\x3e|Yes|INSTALLPACKAGE[Install package]\n INSTALLPACKAGE--\x3eADDSERVICEREPORTER[Add services and<br>reporters to wdio.conf.js]\n CONFIGCOMMAND[config]--\x3e\n EXECUTEWIZARD[Execute setup wizard]--\x3e\n QUESTIONNAIRE[Run questionaire, store<br>answers package variables.]--\x3e\n SYNCMODE{executionMode<br> is sync?}\n SYNCMODE--\x3e|Yes|INSTALLWDIOSYNC["Install<br>@wdio/sync"]\n INSTALLWDIOSYNC--\x3eYARNCHECK["If --yarn, Install packages using<br>yarn, otherwise use npm"]\n SYNCMODE--\x3e|No|ASYNCMODE["Do not install<br>@wdio/sync"]\n YARNCHECK--\x3eCREATEWDIOCONFIG["Create wdio.conf.js"]\n ASYNCMODE--\x3eYARNCHECK\n REPLCOMMAND[repl]--\x3e\n CREATESESSION[Create a new Webdriver session<br>using webdriverio remote]--\x3e\n ADDGLOBALS["Add browser, $, and $$<br>to global scope"]--\x3e\n LOADREPL[Load the REPL by calling the<br>WebdriverIO debug command]--\x3e\n EXITREPL[Exit when REPL closed]'})]})}function E(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.