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
caspermodule- The
Casperclass Casper.optionsclientScriptsexitOnErrorhttpStatusHandlerslogLevelonAlertonDieonErroronLoadErroronPageInitializedonResourceReceivedonResourceRequestedonStepCompleteonStepTimeoutonTimeoutonWaitTimeoutpagepageSettingsremoteScriptssafeLogssilentErrorsstepTimeouttimeoutverboseviewportSizeretryTimeoutwaitTimeout
Casperprototypeback()base64encode()bypass()click()clickLabel()capture()captureBase64()captureSelector()clear()clearCache()clearMemoryCache()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()newPage()open()reload()repeat()resourceExists()run()scrollTo()scrollToBottom()sendKeys()setHttpAuth()setMaxListeners()start()status()switchToFrame()switchToMainFrame()switchToParentFrame()then()thenBypass()thenBypassIf()thenBypassUnless()thenClick()thenEvaluate()thenOpen()thenOpenAndEvaluate()toString()unwait()userAgent()viewport()visible()wait()waitFor()waitForAlert()waitForExec()waitForPopup()waitForResource()waitForUrl()waitForSelector()waitWhileSelector()waitForSelectorTextChange()waitForText()waitUntilVisible()waitWhileVisible()warn()withFrame()withPopup()withSelectorScope()zoom()
- The
- The
clientutilsmodule- Bookmarklet
ClientUtilsprototypeecho()encode()exists()findAll()findOne()forceTarget()getBase64()getBinary()getDocumentHeight()getDocumentWidth()getElementBounds()getElementsBounds()getElementByXPath()getElementsByXPath()getFieldValue()getFormValues()log()makeSelector()mouseEvent()removeElementsByXPath()sendAJAX()setFieldValue()visible()
- The
colorizermodule - The
mousemodule - The
testermodule- The
Testerprototypeassert()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()assertAllVisible()begin()colorize()comment()done()error()fail()formatMessage()getFailures()getPasses()info()pass()renderResults()setUp()skip()tearDown()
- The
- The
utilsmodule- 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
