API DocumentationΒΆ
Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file an issue.
- The
casper
module- The
Casper
class Casper.options
clientScripts
exitOnError
httpStatusHandlers
logLevel
onAlert
onDie
onError
onLoadError
onPageInitialized
onResourceReceived
onResourceRequested
onStepComplete
onStepTimeout
onTimeout
onWaitTimeout
page
pageSettings
remoteScripts
safeLogs
silentErrors
stepTimeout
timeout
verbose
viewportSize
retryTimeout
waitTimeout
Casper
prototypeback()
base64encode()
bypass()
click()
clickLabel()
capture()
captureBase64()
captureSelector()
clear()
debugHTML()
debugPage()
die()
download()
each()
eachThen()
echo()
evaluate()
evaluateOrDie()
exit()
exists()
fetchText()
forward()
log()
fill()
fillSelectors()
fillLabels()
fillXPath()
getCurrentUrl()
getElementAttribute()
getElementsAttribute()
getElementBounds()
getElementsBounds()
getElementInfo()
getElementsInfo()
getFormValues()
getGlobal()
getHTML()
getPageContent()
getTitle()
mouseEvent()
open()
reload()
repeat()
resourceExists()
run()
scrollTo()
scrollToBottom()
sendKeys()
setHttpAuth()
start()
status()
then()
thenBypass()
thenBypassIf()
thenBypassUnless()
thenClick()
thenEvaluate()
thenOpen()
thenOpenAndEvaluate()
toString()
unwait()
userAgent()
viewport()
visible()
wait()
waitFor()
waitForAlert()
waitForPopup()
waitForResource()
waitForUrl()
waitForSelector()
waitWhileSelector()
waitForSelectorTextChange()
waitForText()
waitUntilVisible()
waitWhileVisible()
warn()
withFrame()
withPopup()
zoom()
- The
- The
clientutils
module - The
colorizer
module - The
mouse
module - The
tester
module- The
Tester
prototypeassert()
assertDoesntExist()
assertEquals()
assertEval()
assertEvalEquals()
assertElementCount()
assertExists()
assertFalsy()
assertField()
assertFieldName()
assertFieldCSS()
assertFieldXPath()
assertHttpStatus()
assertMatch()
assertNot()
assertNotEquals()
assertNotVisible()
assertRaises()
assertSelectorDoesntHaveText()
assertSelectorHasText()
assertResourceExists()
assertTextExists()
assertTextDoesntExist()
assertTitle()
assertTitleMatch()
assertTruthy()
assertType()
assertInstanceOf()
assertUrlMatch()
assertVisible()
begin()
colorize()
comment()
done()
error()
fail()
formatMessage()
getFailures()
getPasses()
info()
pass()
renderResults()
setUp()
skip()
tearDown()
- The
- The
utils
module- Functions reference
betterTypeOf()
betterInstanceOf()
dump()
fileExt()
fillBlanks()
format()
getPropertyPath()
inherits()
isArray()
isCasperObject()
isClipRect()
isFalsy()
isFunction()
isJsFile()
isNull()
isNumber()
isObject()
isString()
isTruthy()
isType()
isUndefined()
isWebPage()
mergeObjects()
node()
serialize()
unique()
- Functions reference