DEV Community

17thSep
17thSep

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

Cheers!
Ap

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (1)

Collapse
 
amitkumary profile image
Amit Kumar

Good Intro

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay