Tags:
- 💥 [Breaking Change]
- 👓 [Spec Compliancy]
- 🚀 [New Feature]
- 🐛 [Bug Fix]
- 📝 [Documentation]
- 🏠 [Internal]
- 💅 [Polish]
Note: Gaps between patch versions are faulty, broken or test releases.
See CHANGELOG - v4.
- Martijn Dijkhuizen (@martomo)
webdriverio
- #3251 webdriverio: updating screenshot call to handle backslash (@StephenABoyd)
wdio-reporter
- #3253 wdio-reporter: updating pending test uid if existing (@StephenABoyd)
webdriver
- Other
- #3258 Missing install of @babel/core (@wswebcreation)
- #3260 Updating options docs (@BorisOsipov)
wdio-config
- Bart Smets (@b-smets)
- Boris Osipov (@BorisOsipov)
- Martijn Dijkhuizen (@martomo)
- Wim Selles (@wswebcreation)
- @StephenABoyd
- molsson (@mo)
wdio-jasmine-framework
- #3240 Don't let jasmine swallow errors by ignoring its expectationResultHandler (@christian-bromann)
wdio-junit-reporter
- #3248 Add missing @wdio/reporter dep to junit reporter (@christian-bromann)
- #3243 Set google analytics script into footer of website (@christian-bromann)
- #3245 docs: Fix element commnads referencing the browser object (@WillBrock)
- #3237 Update ConfigurationFile to use goog:chromeOptions (@vinchbr)
- #3236 updating blog post v5 release, thank you section (@TuHuynhVan)
wdio-cli
- #3242 set NODE_ENV to production to not compile source map for NPM code (@christian-bromann)
- Other
- #3241 webdriver: update typing to contain capabilities (@StephenABoyd)
- Christian Bromann (@christian-bromann)
- Martijn Dijkhuizen (@martomo)
- Tu Huynh (@TuHuynhVan)
- Vicenzo Naves (@vinchbr)
- Will Brock (@WillBrock)
- @StephenABoyd
webdriver
,webdriverio
webdriverio
wdio-runner
- #3219 wdio-runner: Fix custom reporter options not being used (@WillBrock)
webdriver
,webdriverio
webdriver
- #3231 docs: Update custom service export (@WillBrock)
- #3220 webdriverio: Update changelog for cli array arguments (@WillBrock)
webdriver
,webdriverio
- #3218 Webdriver and WebdriverIO Typing (@StephenABoyd)
- Martijn Dijkhuizen (@martomo)
- Will Brock (@WillBrock)
- @Gilad-WT
- @StephenABoyd
wdio-cli
- #3211 fix hostname cli param (@christian-bromann)
- Christian Bromann (@christian-bromann)
webdriver
- #3208 Fix bug where Geckodriver requires POST requests to have a valid JSON body (@klipstein)
- #3206 Docs: fix Getting Started guide (part 2) (@goofballLogic)
- #3202 fix: this PR fixes a bug on phones (@wswebcreation)
- Andrew Stewart Gibson (@goofballLogic)
- Tobias von Klipstein (@klipstein)
- Wim Selles (@wswebcreation)
webdriver
- #3135 Add Chromium specific commands to browser object (@christian-bromann)
wdio-config
- #3197 Add support for .es6 file types (@christian-bromann)
webdriver
- #3190 Only set body if a body is required (@christian-bromann)
wdio-jasmine-framework
- #3179 Fix jasmine error reporting (@christian-bromann)
wdio-cli
,wdio-config
,wdio-junit-reporter
,wdio-local-runner
,wdio-reporter
,wdio-runner
,webdriverio
- #3178 Fix unknwon logFile issue + add documentation on logDir option (@christian-bromann)
webdriverio
- #3201 webdriverio: added error messages to the waitForExist call (@StephenABoyd)
webdriver
,webdriverio
- #3176 webdriver: Change getCurrentUrl to getUrl (@WillBrock)
wdio-cli
- #3199 Disable unsupported cli wizard options (@christian-bromann)
- Other
- #3195 webdriverio: Update upgrade instructions (@WillBrock)
webdriverio
- #3184 webdriverio: getCssPropertry changed to getCSSProperty (@WillBrock)
- #3180 webdriverio: Correct deleteCookies example (@WillBrock)
wdio-cli
,wdio-config
,wdio-junit-reporter
,wdio-local-runner
,wdio-reporter
,wdio-runner
,webdriverio
- #3178 Fix unknwon logFile issue + add documentation on logDir option (@christian-bromann)
- #3175 Garbage in npm wdio packages (@BorisOsipov)
- Boris Osipov (@BorisOsipov)
- Christian Bromann (@christian-bromann)
- Will Brock (@WillBrock)
- @StephenABoyd
wdio-cli
,wdio-config
,wdio-interface
,wdio-local-runner
,wdio-runner
,wdio-webdriver-mock-service
,webdriverio
- #3171 Fix middleware regression and add smoke tests (@christian-bromann)
- #3165 Ensure GITHUB_AUTH token is set to generate changelogs (@christian-bromann)
- Christian Bromann (@christian-bromann)
- Dmytro Shpakovskyi (@Marketionist)
- #3163 Name mobile variable "driver" instead of "browser" (@christian-bromann)
- Boris Osipov (@BorisOsipov)
- Christian Bromann (@christian-bromann)
wdio-runner
- #3162 wdio-runner: Fix looking at caps as an array (@WillBrock)
- #3161 Update API.md (@wobbleRed)
- Derek Allred (@wobbleRed)
- Will Brock (@WillBrock)
This version comes with a variety of technical changes that might affect the functionality of 3rd party WebdriverIO packages from the community. If such a package causes problems after the update, please raise an issue in the repository of that package and not in this repository. You can find a list of officially maintained packages here.
-
moved
wdio
cli command fromwebdriverio
package to@wdio/cli
-
commands are scoped to
browser
andelement
- no selector property on commands anymore// v4 browser.click('#myElem')
// v5 and upwards const elem = $('#myElem') elem.click()
-
no command chaining anymore (in standalone and wdio mode)
// v4 (standalone/async mode) browser .url('https://duckduckgo.com/') .setValue('#search_form_input_homepage', 'WebdriverIO') // ...
// v5 (standalone/async mode) await browser.url('https://duckduckgo.com/') const elem = await browser.$('#search_form_input_homepage') await elem.click() await elem.setValue('WebdriverIO')
-
every protocol command returns a
value
property instead of raw driver response// v4 const result = browser.execute(() => 1 + 1) console.log(result) // outputs: // { sessionId: '02aee149a1a421b81598ff2a3b90e33d', // value: 2, // _status: 0 }
// v5 const result = browser.execute(() => 1 + 1) console.log(result) // outputs: 2
-
the
remote
andmultiremote
methods to initiate a driver instance now also start the driver session and therefore return a promise (noinit
command anymore)// v4 import { remote } from 'webdriverio' const driver = remote({ ... }) driver.init().url('https://webdriver.io').end()
// v5 import { remote } from 'webdriverio' const driver = await remote({ ... }) await driver.url('https://webdriver.io') await driver.deleteSession()
-
command changes: over the years WebdriverIO added more and more commands for different automation protocols without applying a pattern to it which resulted in having a bunch of duplication and inconsistent naming, even though the list looks exhausting, most of the commands that have changed were used internally
- renamed commands:
isVisible
→isDisplayed
isVisibleWithinViewport
→isDisplayedInViewport
waitForVisible
→waitForDisplayed
clearElement
→clearValue
moveToObject
→moveTo
(element scope only)setCookie
,getCookie
,deleteCookie
→setCookies
,getCookies
,deleteCookies
getElementSize
→getSize
source
,getSource
→getPageSource
title
→getTitle
actions
→performActions
(WebDriver protocol only)alertAccept
→acceptAlert
alertDismiss
→dismissAlert
alertText
→getAlertText
,sendAlertText
applicationCacheStatus
→getApplicationCacheStatus
(JsonWireProtocol only)cookie
→getAllCookies
,addCookie
,deleteCookie
getCssProperty
→getCSSProperty
element
→findElement
elements
→findElements
elementActive
→getActiveElement
elementIdAttribute
→getElementAttribute
elementIdClear
→elementClear
elementIdClick
→elementClick
elementIdCssProperty
→getElementCSSValue
elementIdDisplayed
→isElementDisplayed
elementIdElement
→findElementFromElement
elementIdElements
→findElementsFromElement
elementIdEnabled
→isElementEnabled
elementIdLocation
→getElementLocation
elementIdLocationInView
→getElementLocationInView
(JsonWireProtocol only)elementIdName
→getElementTagName
elementIdProperty
→getElementProperty
elementIdRect
→getElementRect
elementIdScreenshot
→takeElementScreenshot
elementIdSelected
→isElementSelected
elementIdSize
→getElementSize
(JsonWireProtocol only)elementIdText
→getElementText
elementIdValue
→elementSendKeys
frame
→switchToFrame
frameParent
→switchToParentFrame
timeoutsAsyncScript
,timeoutsImplicitWait
→setAsyncTimeout
,setImplicitTimeout
(JsonWireProtocol only)getLocationInView
→getElementLocationInView
(JsonWireProtocol only)imeActivate
→activateIME
(JsonWireProtocol only)imeActivated
→isIMEActivated
(JsonWireProtocol only)imeActiveEngine
→getActiveEngine
(JsonWireProtocol only)imeAvailableEngines
→getAvailableEngines
(JsonWireProtocol only)imeDeactivated
→deactivateIME
(JsonWireProtocol only)localStorage
→getLocalStorage
,setLocalStorage
,clearLocalStorage
,getLocalStorageItem
,deleteLocalStorageItem
(JsonWireProtocol only)localStorageSize
→getLocalStorageSize
(JsonWireProtocol only)sessionStorage
→getSessionStorage
,setSessionStorage
,clearSessionStorage
,getSessionStorageItem
,deleteSessionStorageItem
(JsonWireProtocol only)sessionStorageSize
→getSessionStorageSize
(JsonWireProtocol only)location
→getElementLocation
log
→getLogs
(JsonWireProtocol only)logTypes
→getLogTypes
(JsonWireProtocol only)screenshot
→takeScreenshot
session
→getSession
,deleteSession
(JsonWireProtocol only)sessions
→getSessions
submit
→elementSubmit
timeouts
→getTimeouts
,setTimeouts
window
,switchToWindow
→switchWindow
windowHandle
→closeWindow
,getWindowHandle
windowHandles
→getWindowHandles
windowHandleFullscreen
→fullscreenWindow
windowHandleMaximize
→maximizeWindow
windowHandlePosition
→setWindowPosition
,getWindowPosition
(JsonWireProtocol only),setWindowRect
,getWindowRect
(WebDriver protocol only)windowHandleSize
→setWindowSize
,getWindowSize
(JsonWireProtocol only),setWindowRect
,getWindowRect
(WebDriver protocol only)hasFocus
→isFocused
end
→deleteSession
reload
→reloadSession
scroll
→scrollIntoView
context
→getContext
,switchContext
contexts
→getContexts
currentActivity
→getCurrentActivity
deviceKeyEvent
→sendKeyEvent
getAppStrings
→getStrings
hideDeviceKeyboard
→hideKeyboard
hold
→longPressKeyCode
launch
→launchApp
performMultiAction
→multiTouchPerform
pressKeycode
→pressKeyCode
rotate
→rotateDevice
setImmediateValue
→setValueImmediate
settings
→getSettings
,updateSettings
strings
→getStrings
toggleTouchIdEnrollment
→toggleEnrollTouchId
- removed commands (Note: there are chances that removed commands will come back if their use case scenario seem to be reasonable.):
doDoubleClick
,doubleClick
- replace with doubleclick
command orperformActions
commanddragAndDrop
- replace withperformActions
commandleftClick
,middleClick
,rightClick
- replace withperformActions
commandselectByValue
- replace withselectByAttribute('value')
selectorExecute
,selectorExecuteAsync
- replace withexecute(elem)
submit
- replace by clicking on submit buttongetCurrentDeviceActivity
- replace bygetCurrentActivity
release
- replace bytouchAction
commandswipe
,swipeDown
,swipeLeft
,swipeRight
,swipeUp
- replace bytouchAction
commandperformTouchAction
- replace bytouchPerform
- with no replacements:
init
,buttonPress
,file
,chooseFile
,uploadFile
,endAll
,getCommandHistory
,waitForSelected
,waitForText
,waitForValue
,getGridNodeDetails
,gridProxyDetails
,gridTestSession
,hold
- new commands:
- WebDriver / JsonWireProtocol:
minimizeWindow
- Appium:
startRecordingScreen
,stopRecordingScreen
,isKeyboardShown
,getSystemBars
,getDisplayDensity
,endCoverage
,replaceValue
,receiveAsyncResponse
,gsmCall
,gsmSignal
,gsmVoice
,sendSms
,fingerPrint
- WebDriver / JsonWireProtocol:
- renamed commands:
-
adding custom commands are scoped to the prototype they are being added to
// v4 browser.addCommand('myCommand', () => { ... }) const elem = $('myElem') console.log(typeof browser.myCommand) // outputs "function" console.log(typeof elem.myCommand) // outputs "function"
// v5 browser.addCommand('myCommand', () => { ... }) const elem = $('myElem') console.log(typeof browser.myCommand) // outputs "function" console.log(typeof elem.myCommand) // outputs "undefined" elem.addCommand('myElemCommand', () => { ... }) console.log(typeof elem.myElemCommand) // outputs "function" const elem2 = $('myOtherElem') console.log(typeof elem2.myElemCommand) // outputs "undefined"
-
spec and suite cli arguments are now passed as an array, e.g.
// v4 ./node_modules/.bin/wdio wdio.conf.js --spec ./tests/foobar.js,./tests/baz.js ./node_modules/.bin/wdio wdio.conf.js --suite FooBar,BarBaz ./node_modules/.bin/wdio wdio.conf.js --suite FooBar
// v5 ./node_modules/.bin/wdio wdio.conf.js --spec ./tests/foobar.js ./tests/baz.js ./node_modules/.bin/wdio wdio.conf.js --suite FooBar BarBaz ./node_modules/.bin/wdio wdio.conf.js --suite FooBar
-
custom configuration for services or reporters are now directly applied to the config list, e.g.
// ... reporters: [ 'spec', [ 'junit', { outputDir: __dirname + '/junit_logs' } ] ], // ...
- implemented parameter assertions for protocol commands
- full W3C WebDriver compliancy
- full Appium and Mobile JSONWire Protocol compliancy
- simplified protocol command maintenance by defining commands, their parameters and response values within simple json constructs
- instead of switching protocol within a running session, WebdriverIO now determines the supported protocol by the driver based on the create session response
- new package
@wdio/applitools-service
for simple visual regression testing with Applitools - new package
eslint-plugin-wdio
for WebdriverIO specific linting rules for ESLint @wdio/devtools-service
now with frontend performance testing capabilities (see example)- new
region
option to simply run tests on SauceLabs in different datacenters debug
command now allows to connect the runner with the Chrome DevTools application for more indepth debugging- decoupling of
@wdio/sync
package from framework adapters so that there is no need to installfibers
when you want to run your commands with async/await - autofetching of all provides log types
- auto retry mechansim for all command requests
- auto refetch mechanism for stale elements
- simplified reattachment to existing sessions with
attach
functionality - integrated and auto maintained TypeScript definitions (still work in progress)
- wdio testrunner fails if no spec files were found
- fixed loss of scope when chaining elements (e.g.
$$('div')[2].$('span').getHTML()
) - browser scope with now updated capabilities (
browser.capabilities
) - improved watch functionality allows to rerun tests without starting a new session all over again
- fixed problems with
addCommand
in multiremote
- brand new documentation page based on the Docusaurus framework
- written in a modern web framework called React
- completely responsive with full support for mobile viewports
- included blog for WebdriverIO related news and article
- fixed links to edit certain documentation pages
- documentation page served via HTTPS per default
- complete rearchitecturing of the whole project into a monorepo
- new v5 codebase with all "offical" supported packages are at
webdriverio/webdriverio
- all depcrecated v4 packages can still be found at github.com/webdriverio-boneyard
- new v5 codebase with all "offical" supported packages are at
- moved all protocol commands into a
webdriver
base package - project sub packages are now released within the
@wdio
NPM organization - renamed services, reporters and other internal packages (e.g.
wdio-sauce-service
→@wdio/sauce-service
) - removed all e2e tests from project to run as unit tests using Jest with a coverage of ~96%
- update to Babel v7 (latest) as well as various of other dependency updates with security fixes
- CPU and Memory improvements by reducing amount of IPC calls
- laid out better governance model for project