cmoore / ash

A Selenium client for Common Lisp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ash

./ash.jpg

Ash is a Selenium client for Common Lisp. It was written against the Selenium 2.x JSON wire protocol described here.

It is incomplete - This was written for a separate project and I added functionality as I needed it. Over time, however, it has proved to be quite useful.

Examples

(setf *ash-host* "127.0.0.1")
(setf *ash-port* 4444)
(with-session ()
  (page-open "http://google.com"))

Creates a new session, opens the page, and closes the session.

(with-session (:autoclose nil)
  (page-open "http://www.google.com"))

Creates a new session, opens the page, but does not close the session.

(with-a-session
  (page-click (find-element-by-text "Login")))

Uses the session from example2, and clicks on the first element with the text “Login”.

Note that with-a-session will use the first available session with no regard to whether it is in use or not. If you’re using Selenium Grid, or using multiple connections to Selenium, you’re almost always better off using with-session.

About

A Selenium client for Common Lisp


Languages

Language:Common Lisp 100.0%