Nightwatch logo of an owl 測試框架
指南
API
關於
部落格
Search 測試框架
GitHub 測試框架
Discord 測試框架
3.7.0
上一個版本 2.6.19
版本 1.7
版本 0.9
所有版本
指南
API
關於
部落格
Github
Discord
版本發行說明
(目前版本 3.7.0)
Api 頁面
瀏覽器
總覽
axeInject
axeRun
返回
captureBrowserConsoleLogs
captureBrowserExceptions
debug
enablePerformanceMetrics
結束
前進
框架
框架父層
getCurrentUrl
getLog
getLogTypes
getPerformanceMetrics
getTitle
init
isLogAvailable
navigateTo
暫停
執行
結束
重新整理
registerBasicAuth
saveScreenshot
saveSnapshot
screenshot
session
sessions
setDeviceDimensions
setGeolocation
狀態
送出
takeHeapSnapshot
逾時
timeoutsAsyncScript
timeoutsImplicitWait
網址
urlHash
useCss
useXpath
waitForElementNotPresent
waitForElementNotVisible
waitForElementPresent
waitForElementVisible
waitUntil
.alerts
接受
取消
getText
setText
.appium
getContext
getContexts
getCurrentActivity
getCurrentPackage
getGeolocation
getOrientation
hideKeyboard
isKeyboardShown
longPressKeyCode
pressKeyCode
setContext
setGeolocation
setOrientation
startActivity
.assert
總覽
attributeContains
attributeEquals
attributeMatches
cssProperty
domPropertyContains
domPropertyEquals
domPropertyMatches
elementsCount
elementPresent
hasClass
hasAttribute
hasDescendants
enabled
selected
textContains
textEquals
textMatches
titleContains
titleEquals
titleMatches
urlContains
urlEquals
urlMatches
valueContains
valueEquals
visible
.chrome
總覽
.cookies
delete
deleteAll
get
getAll
set
.document
injectScript
source
executeScript
executeAsyncScript
.element
總覽
尋找元素
find
findAll
findByAltText
findAllByAltText
findByPlaceholderText
findAllByPlaceholderText
findByRole
findAllByRole
findByLabelText
findByText
findAllByText
getFirstElementChild
getLastElementChild
getNextElementSibling
getPreviousElementSibling
getShadowRoot
元素互動
check
清除
點擊
拖放
sendKeys
setAttribute
setPassword
setProperty
setValue
送出
更新
上傳
送出表單
取消勾選
更新值
uploadFile
元素狀態
clearValue
elementActive
getAccessibleName
getAriaRole
getAttribute
getCssProperty
getProperty
getRect
getElementSize
getTagName
getText
getValue
getId
hasDescendants
isEnabled
isSelected
isVisible
isPresent
使用者動作
waitUntil
clickAndHold
doubleClick
rightClick
moveTo
Selenium Actions API
螢幕截圖
takeScreenshot
.expect
總覽
語言鏈
equal() / contain() / match()
startWith() / endWith()
.not
before() / after()
.cookie()
.element()
.a() / .an()
.active
.attribute(name)
.css(property)
.enabled
.present
.property(name)
.selected
.text
.value
.visible
.elements()
.count
.title()
.url()
.firefox
總覽
.network
captureRequests
mockResponse
setConditions
.window
close
fullscreen
getAllHandles
getHandle
getPosition
getRect
getSize
maximize
minimize
open
setPosition
setRect
setSize
switchTo
頁面物件
總覽
實例
指令
使用者動作
總覽
可用的動作
動作刻度
工作範例
程式化 API
使用程式化 API
.status()
建議編輯
查詢伺服器目前的狀態。
用法
.status([callback])
參數
名稱
類型
描述
callback
function
回呼函式,會使用結果值呼叫。
W3C WebDriver 規格
/#status