Git Product home page Git Product logo

balena-webdriverio's Introduction

balenaCloud + WebdriverIO using Chromium on ARM Devices

Superior web automation now becomes portable, with high-performance ARM-based devices.

This repository contains code of Getting Started with Webdriverio compatible to run as a service on balenaCloud with any balenaOS ARM device such as BalenaFin, Raspberrypi3 and more. Tested on balenaFin running balenaOS 2.48.0+rev1

Illustration Source: WebdriverIO docs

Chromedriver and Selenium not being available for the ARM architecture. Lead us to work with WebDriverIO for our web automation and testing needs, which uses Chrome DevTools protocol by default. Using Chrome Devtools protocol natively and replacing legacy Webdriver Protocol comes with many benefits. Some being:

  • Lesser dependencies to manage
  • Works natively with major browsers without the need for a driver (even Firefox)
  • Faster, more efficient performance (The communication happens without any proxy, directly to the browser using WebSockets)
  • Be able to test browser performance and much more.

It has cons too which are better explained on WebdriverIO Automation protocols page. Mainly, it can't be used remotely which works out for us as we run everything in containers. Let's get started.

Running WebdriverIO on balenaCloud

  1. Grab a balenaFin, flash with the configuration for the application you just deployed, connect it, and wait for the magic to happen.
  2. Head over to the balenaCloud application to see if your device is online (It take at most 2-5 minutes)
  3. When done, the device would automatically start downloading the latest docker image and when done will run the tests.
  4. You can check the output in the logs on your balenaCloud dashboard

Webdriverio Testrunner running on BalenaFin over on Balena Cloud

The tests will run, open Chromium browser with the arguments provided in the wdio.conf.js file, connect puppeteer with the browser, and execute the tests. In the end, you would see test results over on the terminal. That's about it, now you can modify your tests from the tests folder (Written using Mocha) and explore more into Web automation and Webdriverio. If you are new to balenaCloud as well, we got you covered.

Support & Credits

For any queries or bug reports, feel free to open an issue. Thanks to Christian Bromann for his help!

License

All source code under this repository is MIT licensed.

balena-webdriverio's People

Contributors

dependabot[bot] avatar vipulgupta2048 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.