How to create browser automation tests?

I am a consultant and implement software for clients. I would like to create browser automation tests for an application that isn’t mine to ensure the configuration works as expected. I like the API of Wallaby, but I am struggling to figure out how to set it up when the application isn’t my own. Most of the instructions seem to be geared toward writing test for Phoenix applications.

Do anyone have an example of a simple example of going to website such as wikipedia?

How would the test_helper.exs :base_url be configured for the above example?:


Application.put_env(:wallaby, :base_url, YourAppWeb.Endpoint.url)

I am sorry, I am still very new to Elixir and the ecosystem.

Thank you!

Apologies for the delay, but i answered your question on GitHub: Simple browser automation example · Discussion #723 · elixir-wallaby/wallaby · GitHub


Simply searching for browser automation on hex should solve your problem.

I did not used wallaby, but on Github’s file there is:

Finally, in your test_helper.exs you can provide some configuration to Wallaby. At minimum, you need to specify a :base_url, so Wallaby knows how to resolve relative paths.

# test/test_helper.exs

Application.put_env(:wallaby, :base_url, YourAppWeb.Endpoint.url)

I guess you can put any base url there.


Thank you! Believe me, I feel soo stupid for asking this question but I just want to use this library so bad :).