WebDriverIO framework first steps

Hey guys, I have been studying a framework called WebdriverIO, it is a really good framework for Angular applications. It is compatible with BDD and TDD, so you can create your featuresimplement the step definition and it is also a synchronous command handling !!

Not only the hooks, but many useful parts are already in the config file, so you don’t need to create them separately, which is  always very handful.

I have pushed the project to github so you can have a look on my example, it is very simple for now.

https://github.com/rafaelaazevedo/webdriverio-study

 

– To run the project you need to run npm install and after ./node_modules/.bin/wdio wdio.conf.js

 

– In the login-spec.js you can add the scenario (describe) and the steps (it) directly like the step definitions, I don’t have the feature files for now.

– Look how you don’t need to add return for each step anymore. Since the steps are sync you don’t need to worry about it.

– The login-page.js groups all the common functions that will be used on the login scenarios.

– And the login-elements.js contains all the element getters that are on the login page, it works like a library for the elements and it will help you with the maintenance of the code.

If you want to give it a try as well you can add the webdriverio in the package of your project and follow these steps

One thought on “WebDriverIO framework first steps

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.