Nothing has been indexed for 0.3.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  webdrivers:
    github: crystal-loot/webdrivers.cr
    version: ~> 0.3.1

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.3.1. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

Webdrivers

GitHub release (latest by date) Build status

A Crystal port of the Ruby webdrivers gem. It automatically installs and updates supported webdrivers.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      webdrivers:
        github: crystal-loot/webdrivers.cr
  2. Run shards install

Usage

require "webdrivers"

On whichever driver you use, calling .install will install, update the local driver if needed and then return the path to it.

Chrome

webdriver_path = Webdrivers::Chromedriver.install

Firefox (Gecko)

webdriver_path = Webdrivers::Geckodriver.install

Locating the Chrome browser

On Linux, Webdrivers searches a list of common install paths (including Snap and Flatpak exports) for a Chrome/Chromium binary in order to detect the installed version. Two environment variables let you override that search when your install lives somewhere unusual:

  • WEBDRIVERS_CHROME_BINARY — absolute path to the Chrome binary. When set, the search is skipped and this path is used directly.

Development

  • Fork
  • Code
  • crystal tool format spec/ src/
  • ./bin/ameba
  • crystal spec
  • Commit
  • Open PR

Contributing

  1. Fork it (https://github.com/crystal-loot/webdrivers.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors