Menu
WebdriverIODocsAPIHelpVersionsContributeGitHub
WebdriverIO
  • Docs
  • API
  • Help
  • Versions
  • Contribute
  • GitHub
  • Introduction
    • API Docs
  • Protocols
    • Webdriver Protocol
    • Appium
    • JSON Wire Protocol
    • Mobile JSON Wire Protocol
    • Chromium
    • Sauce Labs
    • Selenium Standalone
  • Testrunner
    • Expect
  • browser
    • $$
    • $
    • call
    • custom$$
    • custom$
    • debug
    • deleteCookies
    • execute
    • executeAsync
    • getCookies
    • getWindowSize
    • keys
    • newWindow
    • pause
    • react$$
    • react$
    • reloadSession
    • saveRecordingScreen
    • saveScreenshot
    • setCookies
    • setTimeout
    • setWindowSize
    • switchWindow
    • touchAction
    • uploadFile
    • url
    • waitUntil
  • element
    • $$
    • $
    • addValue
    • clearValue
    • click
    • custom$$
    • custom$
    • doubleClick
    • dragAndDrop
    • getAttribute
    • getCSSProperty
    • getHTML
    • getLocation
    • getProperty
    • getSize
    • getTagName
    • getText
    • getValue
    • isClickable
    • isDisplayed
    • isDisplayedInViewport
    • isEnabled
    • isEqual
    • isExisting
    • isFocused
    • isSelected
    • moveTo
    • react$$
    • react$
    • saveScreenshot
    • scrollIntoView
    • selectByAttribute
    • selectByIndex
    • selectByVisibleText
    • setValue
    • shadow$$
    • shadow$
    • touchAction
    • waitForClickable
    • waitForDisplayed
    • waitForEnabled
    • waitForExist
    • waitUntil

pause

Pauses execution for a specific amount of time. It is recommended to not use this command to wait for an element to show up. In order to avoid flaky test results it is better to use commands like waitForExist or other waitFor* commands.

Usage#
browser.pause(milliseconds)
Parameters#
NameTypeDetails
millisecondsNumbertime in ms
Example#
it('should pause the execution', () => {
const starttime = new Date().getTime()
browser.pause(3000)
const endtime = new Date().getTime()
console.log(endtime - starttime) // outputs: 3000
});
Edit this page
Previous
« newWindow
Next
react$$ »

Community

  • Twitter
Copyright © 2020 OpenJS Foundation