← Bot Army Cookbook

How do I... Do browser UI testing?

Can the bots use a browser? Yes they can. It's pretty simple actually, you just need to use Hound, an Elixir browser automation library, in your actions. In that way, it's not much different from using an HTTP library. In fact, you could create both an HTTP adapter, and a Hound adapter with the same API for your actions to call, and switch them out at runtime as needed. In other words, you can use the same bot trees and actions to run both API level tests and browser UI tests!

Getting set up is super easy - I've created a UI testing demo repository with full instructions and examples that you can just clone and modify as needed. Be sure to read the Hound docs.

UI testing is notoriously flakey. You can mitigate problems if you are disciplined. Here are a few tips:

Happy automating!