Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mayvenn/limo
A wrapper around selenium webdriver
https://github.com/mayvenn/limo
clojure selenium-webdriver wrapper
Last synced: 3 months ago
JSON representation
A wrapper around selenium webdriver
- Host: GitHub
- URL: https://github.com/mayvenn/limo
- Owner: Mayvenn
- License: epl-1.0
- Created: 2016-01-16T00:08:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-30T00:25:06.000Z (about 5 years ago)
- Last Synced: 2024-10-21T04:00:38.251Z (4 months ago)
- Topics: clojure, selenium-webdriver, wrapper
- Language: Clojure
- Size: 202 KB
- Stars: 25
- Watchers: 9
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Limo ![Actions](https://github.com/mayvenn/limo/workflows/Clojure%20CI/badge.svg)
[API Docs](http://mayvenn.github.io/limo)
A Clojure library that's a small wrapper around selenium webdriver.
Why a new wrapper? This library aims to provide a high-level capybara-styled api.
Limo embraces its tight coupling to Selenium Webdriver. That means no wrapper types. When you need to drop down the native selenium API, you are free to do so.
## Installation
Add your `project.clj` file:
[![Clojars Project](https://img.shields.io/clojars/v/limo.svg)](https://clojars.org/limo)
## Basic Usage - functional test
Currently similar to [clj-webdriver](https://github.com/semperos/clj-webdriver). Unlike clj-webdriver, all actions will poll and ignore stale element exceptions for 15 seconds (by default).
```clojure
(ns app.test
(:require [limo.api :as api]
[limo.driver :as driver]
[clojure.test :refer :all]))(deftest test-login
;; sets the implicit driver to use.
;; Alternatively you can pass the driver in as the first argument
(api/set-driver! (driver/create-chrome))
;; tells selenium webdriver to implicitly wait 1s, for up the *default-timeout* (explicit wait) of 15 seconds
;; see http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp for more details
(api/implicit-wait 1000)
(api/to "http://example.com")
(api/fill-form {"#email" email
"#password" password})
(api/click "#login")
(is (contains-text? "#flash-message" "Welcome! You have signed up successfully."))
```## Alternate Usage - automate login, data scraping, etc
You can also create a new project that use Limo to automate manual tasks using
[limo-driver](https://github.com/agilecreativity/limo-driver).e.g.
```sh
lein new limo-driver
```
This will create the basic CLI project that you can use as starting point to quickly.Please see [limo-driver's README.md](https://github.com/agilecreativity/limo-driver/blob/master/README.md) for more details.
## License
Copyright © 2020 Mayvenn
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.