DEV Community


Posted on

How does WebdriverIO work

Sooooooo the elements of a Webdriverio Automation framework, what does it have?

Alt Text

Of course, we need a browser where we can execute our scripts

An environment, Node.js where we can write scripts to pass commands

An IDE, Vscode where we can edit and write code efficiently with various extensions

A scripting language, Javascript or Typescript which the Node.js platform understands

A bunch of libraries/node modules Webdiverio Pupetteer Allurereports Cucumber etc.. to help achieve the various task we are wanting to achieve

Put this all together ...Booommmm! We can achieve what we want to in Automation

Since webdriverIO is Node.js based we have the entry into package.json first from there the control shifts to the wdio config file

Config file is the control room of this Automation execution with this js file holding all the critical information like

  • what browser
  • how many browsers
  • what files to test
  • where are the test files located
  • what framework
  • what kind of reports
  • where to run etc.

Finally, when we try to execute the scripts by entering npm test in the terminal then the terminal transfers this to npm which will inturn search in the package.json

Once the specific command is executed {usually to run the config file with node} then the flow goes to the config which then handles the rest.

Cool, If you are interested in learning more about webdriverio, keep a watch here or my youtube channel

You can watch all this with a small demo in the below video


Top comments (1)

amitkumary profile image
Amit Kumar

Good Intro