Today we’ll be Test Talking with Casey Cantwell a Senior QA Architect about WebDriver.io Automation. This episode came about after I received an email from Casey who asked “In reading your blog post on “frameworks you need to know article” I was surprised to see a framework based on Node.js didn’t get any love in your article. We chose Webdriver.IO as our product is all Node.js / JavaScript and are loving it.” So I asked Casey if he would be open to being interviewed about his experiences with creating Node.js based automation frameworks. So that what will be test talking all about today.
231: Nodejs Automation Frameworks with Casey Cantwell
with Casey Cantwell
proponent · agile methodology
About this episode
Quotes & Insights from this Test Talk with Casey Cantwell
- When I started this company I was given a period of time to do a POC where I was able to evaluate different technologies and different tools knowing that ultimately I wanted to build an automation strategy that was going to allow us to release code after we finished a sprint. So our goal is we have a sprint we develop stories and when that sprint to the finish. We want to be able to promote that code to production with a high level of quality and in a very short period of time. So we needed an automation framework that we could build that was going to be flexible, it needed to be cost-effective, it needed to be very maintainable it needed to have fantastic reporting. And most importantly we needed an automation framework that we could put into our CI/CD pipelines.
- One of the challenges that we had in developing automation is it was because of the technology stack that our platform is being built on. So our technology stack for the platform is Node.js on the backend javascript, HTML and CSS in the front end. And specifically, we're using a technology called polymer web components and lit element on the front end which has shadow DOMS in that technology. And what's interesting about the technology stack that I'm having to automate against is that selenium by default does not support shadow Dom.
- The reason we chose WebDriver.io specifically is that our development stack was primarily javascript. Our development team their full stack developers all developing in JavaScript so it naturally led us to wouldn't it make the most sense to also have an automation architecture and framework in the same language that our developers are developing in.
- To be honest my POCs is we're not very successful when I was trying to automate against Web Components using polymer. A lot of the traditional play and record tools couldn't find an element because our elements were hidden within a shadow. And that posed a real challenge for us. And then some tools that we were evaluating they didn't support Safari or they only supported Chrome. One of our criteria was that it needed to have wide adoption against the things that we needed to support.
- WebDriver.io is our test runner. And we had to develop the classes to support the ability to get those elements. So we're using on page objects. So every page, every component, every view everything has its own class inside our automation framework. So at the highest level, we can say app. this object and then the framework will return to that object. But most importantly that objects selector path will be set up to be its parent's selector your path plus your current selector path.
- The one actual advice that I have for folks that are working in an automation framework is to really consider your test scripts and how you're abstracting them. Everyone's goal should be to not have duplicated code or copy code and you want to be able to abstract tests in a certain way that you can take a lot of that duplicated code out.
Keep listening
Related episodes

Automation Testing Podcast · Ep. 612
Robot Framework Test Automation: Automate Web, Desktop, Mobile, and Embedded Systems
What makes Robot Framework flexible enough to test medical devices, low code bots, monitoring systems, and embedded
Nov 17

Automation Testing Podcast · Ep. 611
Playwright at Scale: Run 500 Tests in Minutes with Oliver Stenbom
with Oliver Stenbom
Is your Playwright suite slowing you down instead of speeding you up? In this episode, Oliver Stenbom,
Nov 10

Automation Testing Podcast · Ep. 610
How to Prove Your Release Is Ready When AI Writes the Code
How to Prove Your Release Is Ready When AI Writes the Code? Can you prove your software is ready to ship, or does that answer still depend on a meeting and a spreadsheet? Want to see if your team can prove a release is ready? Book a custom LoopIQ demo with Ashwin: https://testgld.link/loopiqdemo In this episode,
Nov 3

Automation Testing Podcast · Ep. 609
Why Your AI Tests Pass When Your Features Fail with Donovan Brady
with Donovan Brady
Why Your AI Tests Pass When Your Features Fail? Donovan Brady of Leapwork shows how to make
Oct 27