slimer

slimer is an object available automatically in scripts.

clearHttpAuth()

It clears all HTTP authentication that have been made. Then, when a webpage needs an HTTP auth, username and password will be asked again.

See doc about http authentication with SlimerJS.

Introduced: SlimerJS 0.9

exit()

It stops the script and SlimerJS exit.

It accepts an optional exit code but it is ignored because of a limitation in Firefox/XulRunner.

slimer.exit();

Note: your script may continue to be executed after the call of this method, because of the asynchronous behavior of this function.

isExiting()

Indicate if exit() has been called. Since the exiting process is asynchronous, scripts may continues to be executed after exit(). So the script may interrupts its processing by checking this status

Introduced: SlimerJS 0.9.4

hasFeature(featureName)

Returns true if the given feature is implemented and enabled.

It can indicate the state of these features:

  • "coffeescript": indicates if CoffeeScript is available. It may be disabled in some case (during GhostDriver execution for example)

False is returned for all other feature unknown by this method.

version

Contain the version of SlimerJS (read-only). This is an object containing three properties, major, minor, patch:

var v = slimer.version;
console.log('version: ' + v.major + '.' + v.minor + '.' + v.patch);

geckoVersion

Contain the version of Gecko, the core of Firefox and XulRunner. In fact, this is also the version of Firefox or XulRunner.

This is an object containing three properties, major, minor, patch:

var v = slimer.geckoVersion;
console.log('version: ' + v.major + '.' + v.minor + '.' + v.patch);

Introduced: SlimerJS 0.9

wait(milliseconds)

SlimerJS do a pause during the given amount of time (in milliseconds). It can be useful in some case to wait after a reflow or something like that. Note that it does not freeze the browser.

Table Of Contents

Previous topic

phantom

Next topic

Cookie

This Page