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
結束
前進
框架
frameParent
getCurrentUrl
getLog
getLogTypes
getPerformanceMetrics
getTitle
init
isLogAvailable
navigateTo
暫停
執行
退出
重新整理
registerBasicAuth
saveScreenshot
saveSnapshot
螢幕截圖
session
sessions
setDeviceDimensions
setGeolocation
狀態
提交
takeHeapSnapshot
timeouts
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
已啟用
已選取
textContains
textEquals
textMatches
titleContains
titleEquals
titleMatches
urlContains
urlEquals
urlMatches
valueContains
valueEquals
可見
.chrome
概觀
.cookies
刪除
全部刪除
取得
全部取得
設定
.document
injectScript
原始碼
executeScript
executeAsyncScript
.element
概觀
尋找元素
尋找
全部尋找
findByAltText
findAllByAltText
findByPlaceholderText
findAllByPlaceholderText
findByRole
findAllByRole
findByLabelText
findByText
findAllByText
getFirstElementChild
getLastElementChild
getNextElementSibling
getPreviousElementSibling
getShadowRoot
元素互動
勾選
清除
點擊
拖放
sendKeys
設定屬性
設定密碼
設定屬性
設定值
提交
更新
上傳
提交表單
取消勾選
更新值
上傳檔案
元素狀態
clearValue
elementActive
getAccessibleName
getAriaRole
getAttribute
getCssProperty
getProperty
getRect
getElementSize
getTagName
getText
getValue
getId
hasDescendants
isEnabled
isSelected
isVisible
isPresent
使用者動作
waitUntil
clickAndHold
doubleClick
rightClick
moveTo
Selenium 動作 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
關閉
全螢幕
getAllHandles
getHandle
getPosition
getRect
getSize
最大化
最小化
開啟
setPosition
setRect
setSize
switchTo
頁面對象
概觀
實例
指令
使用者動作
概觀
可用的動作
動作刻度
工作範例
程式化 API
使用程式化 API
.refresh()
建議編輯
重新整理目前頁面。
用法
參數
名稱
類型
描述
回呼
選用
函式
選用的回呼函式,在指令完成時呼叫。
W3C WebDriver 規範
/#refresh