chickadee » selenium

selenium

TOC »

Introduction

Chicken bindings for Selenium (http://code.google.com/p/selenium)

Very early stages. Implements the JSON Wire Protocol (http://code.google.com/p/selenium/wiki/JsonWireProtocol) and the remote and Firefox webdrivers.

Currently the Firefox webdriver requires a profile directory. You can get the data I'm using for the profile at http://parenteses.org/mario/misc/profile.tar.bz2. Extract this archive and give its full path to with-firefox-webdriver (see the tests/firefox.scm file for usage example).

Warning: since these bindings are in very early development stage, the API is subject to change.

Author

Mario Domenech Goulart

Repository

https://github.com/mario-goulart/selenium

API

Session

quit!
(quit!) procedure
capabilities
(capabilities) procedure
set-implicit-wait-time!
(set-implicit-wait-time! time-ms) procedure

Javascript

execute-javascript
(execute-javascript script args) procedure
execute-javascript-async
(execute-javascript-async script args) procedure
javascript-dialog-text
(javascript-dialog-text) procedure
set-javascript-dialog-text!
(set-javascript-dialog-text! text) procedure
dismiss-javascript-dialog!
(dismiss-javascript-dialog!) procedure
accept-javascript-dialog!
(accept-javascript-dialog!) procedure

URLs

set-url!
(set-url! url) procedure
current-url
(current-url) procedure

Navigation

navigate-forward!
(navigate-forward!) procedure
navigate-backward!
(navigate-backward!) procedure

IME: Input Method Editor

ime-available-engines
(ime-available-engines) procedure
ime-active-engine
(ime-active-engine) procedure
ime-activated?
(ime-activated?) procedure
ime-deactivate!
(ime-deactivate!) procedure
ime-activate!
(ime-activate!) procedure

Frames & windows

focus-frame!
(focus-frame! id) procedure
focus-window!
(focus-window! id) procedure
close-window!
(close-window! id) procedure
window-handle
(window-handle) procedure
window-handles
(window-handles) procedure

User input

user-input-speed
(user-input-speed) procedure
set-user-input-speed!
(set-user-input-speed! speed) procedure

Elements

active-element
(active-element) procedure
get-element-by-id
(get-element-by-id id) procedure
get-element-by-name
(get-element-by-name name) procedure
get-element-by-class-name
(get-element-by-class-name class-name) procedure
get-element-by-css-selector
(get-element-by-css-selector css-selector) procedure
get-element-by-tag-name
(get-element-by-tag-name tag-name) procedure
get-element-by-xpath
(get-element-by-xpath xpath) procedure
element-value
(element-value element) procedure
element-tag-name
(element-tag-name element) procedure
element-text
(element-text element) procedure
select-element!
(select-element! element) procedure
toggle-element!
(toggle-element! element) procedure
click-element!
(click-element! element) procedure
clear-element!
(clear-element! element) procedure
hover-element!
(hover-element! element) procedure
drag-element!
(drag-element! element) procedure
element-enabled?
(element-enabled? element) procedure
element-selected?
(element-selected? element) procedure
element-displayed?
(element-displayed? element) procedure
element-location
(element-location element) procedure
element-location-in-view
(element-location-in-view element) procedure
element-size
(element-size element) procedure
element-css-property-value
(element-css-property-value element) procedure
set-element-value!
(set-element-value! element value) procedure
active-element-send-modifier!
(active-element-send-modifier! key down?) procedure
element-attribute-value
(element-attribute-value element attribute) procedure
same-element?
(same-element? element1 element2) procedure
get-elements-by-class-name
(get-elements-by-class-name class-name) procedure
get-elements-by-css-selector
(get-elements-by-css-selector css-selector) procedure
get-elements-by-id
(get-elements-by-id id) procedure
get-elements-by-name
(get-elements-by-name name) procedure
get-elements-by-tag-name
(get-elements-by-tag-name tag-name) procedure
get-elements-by-xpath
(get-elements-by-xpath xpath) procedure

Cookies

get-cookies
(get-cookies) procedure
set-cookie!
(set-cookie! name value #!key path domain secure? expiry) procedure
get-cookies-by-name
(get-cookies-by-name name/regex) procedure
get-cookies-by-value
(get-cookies-by-value value/regex) procedure
get-cookies-by-domain
(get-cookies-by-domain domain/regex) procedure
get-cookies-by-path
(get-cookies-by-path path/regex) procedure
cookie-name
(cookie-name cookie) procedure
cookie-value
(cookie-value cookie) procedure
cookie-path
(cookie-path cookie) procedure
cookie-domain
(cookie-domain domain) procedure
cookie-secure?
(cookie-secure? cookie) procedure
cookie-expiry
(cookie-expiry cookie) procedure

Pages

page-source
(page-source) procedure
page-title
(page-title) procedure
refresh-page!
(refresh-page!) procedure

Screen

screen-orientation
(screen-orientation) procedure
screenshot
(screenshot) procedure

Mouse actions

move-mouse-cursor-to!
(move-mouse-cursor-to! #!optional x y element) procedure
click-mouse-button!
(click-mouse-button! #!optional button) procedure
mouse-button-down!
(mouse-button-down!) procedure
mouse-button-up!
(mouse-button-up!) procedure
double-click-mouse-button!
(double-click-mouse-button!) procedure

Firefox webdriver

with-firefox-webdriver
(with-firefox-webdriver profile-dir thunk #!key (scheme 'http) (host "127.0.0.1") (port 7055) (path "/hub") (command "firefox") (capabilities '((browserName . "firefox") (javascriptEnabled . #t) (platform . "ANY")))) procedure

"Remote" webdriver

with-remote-webdriver
(with-remote-webdriver jar-file thunk #!key (scheme 'http) (host "127.0.0.1") (port 4444) (path "/wd/hub") (command "java -jar") (capabilities '())) procedure

License

BSD

Version history

Version 0.6

Category changed from web to testing

Version 0.5

Meta file fix (added category section)

Version v0.4

Fixed versions in release-info file

Version 0.3

Minor fixes: fixed version declaration in .setup. Unexported desired-capabilities, command-executor-host, command-executor-port and command-executor-path.

Version 0.2

Added release-info file

Version 0.1

Initial release

Contents »