API Documentation Website

LuckyFlow is a library for testing user flows in the browser. It is similar to Ruby's Capybara.

LuckyFlow example

Installation in Lucky projects

LuckyFlow is already installed and configured. Check out the guides to see how to use it:

Installation in other Crystal projects

Add this to your application's shard.yml:

    github: luckyframework/lucky_flow

Configure LuckyFlow in spec/

require "lucky_flow"

LuckyFlow.configure do |settings|
  # This is required
  settings.base_uri = "http://localhost:<port>"

  # Optional settings. Defaults are shown here
  settings.retry_delay = 10.milliseconds
  settings.stop_retrying_after = 1.second
  settings.screenshot_directory = "./tmp/screenshots"
  settings.browser_binary = "/Applications/Brave Browser"

# Put this at the bottom of the file.
# If a required setting is missing, this will catch it.

Then view the guides:

You should be ready to go!

For use with some of the Lucky shards (including Lucky itself), you'll need to require a few extensions:

# This extension adds an override to `visit` allowing you
# to pass in a Lucky::Action.class or Lucky::RouteHelper
require "lucky_flow/ext/lucky"

# This extension adds a `fill_form` method that you can pass
# an Operation or SaveOperation to which will populate form
# fields for you
require "lucky_flow/ext/avram"

# Similar to the Lucky extension, this gives an additional override
# to `visit` that allows you to visit a page as a specific User
require "lucky_flow/ext/authentic"


Note that you can only pass string paths to visit since only Lucky has route helpers described in the guide below. Example: visit "/my-path"

View guide at:


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Install docker and docker-compose:
  4. Run script/setup
  5. Make your changes
  6. Run script/test to run the specs, build shards, and check formatting
  7. Commit your changes (git commit -am 'Add some feature')
  8. Push to the branch (git push origin my-new-feature)
  9. Create a new Pull Request