Skip to content

Latest commit

 

History

History
179 lines (155 loc) · 22.8 KB

COMPATIBILITY.md

File metadata and controls

179 lines (155 loc) · 22.8 KB

Compatibility

  • ✅ Supported
  • ⚠️ Partial support
  • 🕓 Not implemented yet
  • ⭕ Not supported (might be too big for current scope, or very tricky one to handle)

Queries

Command Basic syntax Arguments Notes
.as() ⚠️ ⚠️ Supports wrapped values and elements, type option is not implemented
.children() - 3
.closest() 🕓 🕓
.contains() ⚠️ ⚠️ selectors are not implemented, includeShadowDom option is not implemented, 3
.document() - 3
.eq() - 3
.filter() - 3
.find() ⚠️ includeShadowDom option is not implemented, 3
.first() - 3
.focused() -
.get() ⚠️ includeShadowDom, withinSubject options are not implemented, 3
.hash() - 3
.invoke() 🕓 🕓
.its() 🕓 🕓
.last() - 3
.location() - 3
.next() - 3
.nextAll() ⚠️ - selector argument is not implemented, 3
.nextUntil() 🕓 🕓
.not() - 3
.parent() ⚠️ - selector argument is not implemented, 3
.parents() 🕓
.parentsUntil() 🕓 🕓
.prev() ⚠️ - selector argument is not implemented, 3
.prevAll() ⚠️ - selector argument is not implemented, 3
.prevUntil() 🕓 🕓
.readFile() 🕓 🕓
.root() 🕓 🕓
.shadow() 🕓 🕓
.siblings() ⚠️ 🕓 selector argument is not implemented, 3
.title() - 3
.url() ⚠️ decode option is not implemented, 3
.window() - 3

Assertions

Actions

Command Basic syntax Arguments Notes
.check() ⚠️ 🕓 1, string and array argument is not implemented
.clear() -
.click() ⚠️ 1, position argument accepts only x, y coordinates
.dblclick() ⚠️ 1, position argument accepts only x, y coordinates
.rightclick() ⚠️ 1, position argument accepts only x, y coordinates
.scrollIntoView() 🕓
.scrollTo() ⚠️ duration, easing and ensureScrollable options are not implemented
.select() - 1
.selectFile() 🕓 🕓
.trigger() ️ ✅ ⚠️ 1, position, x, y and options are not implemented
.type() ️ ✅ 🕓 1
.uncheck() ⚠️ 🕓 1, string and array argument is not implemented

Assertions

Command .should() expect() Notes
Assertions ⚠️ 2

Other commands

Command Basic syntax Arguments Notes
.blur() - 1
.clearAllCookies() -
.clearAllLocalStorage() 🕓 🕓
.clearAllSessionStorage() 🕓 🕓
.clearCookie() 🕓
.clearCookies() 🕓
.clearLocalStorage() 🕓 🕓
.clock() 🕓 🕓
.debug() -
.each() 🕓 🕓
.end() 🕓 🕓
.exec() 🕓 🕓
.fixture() 🕓 🕓
.focus() -
.getAllCookies() -
.getAllLocalStorage() 🕓 🕓
.getAllSessionStorage() 🕓 🕓
.getCookie() 🕓
.getCookies() 🕓
.go() 🕓 🕓
.hover() 🕓 🕓
.intercept() 🕓 🕓
.log() 🕓 🕓
.mount() 🕓 🕓
.origin() 🕓 🕓
.pause() -
.reload() 🕓 🕓
.request() 🕓 🕓
.screenshot() 🕓 🕓
.session() 🕓 🕓
.setCookie() sameSite option is not implemented
.spread() 🕓 🕓
.spy() 🕓 🕓
.stub() 🕓 🕓
.submit() 🕓 🕓
.task() 🕓 🕓
.then() 🕓 🕓
.tick() 🕓 🕓
.viewport() 🕓 🕓
.visit() 🕓
.wait() ⚠️ 🕓 Waiting for aliases is not implemented yet
.within() 🕓 🕓
.wrap() ⚠️ - Only JS values and promises
.writeFile() 🕓 🕓

Cypress API

Command Basic syntax Arguments Notes
Catalog of Events 🕓 🕓
Custom Commands 🕓 🕓
Custom Queries 🕓 🕓
Cypress.arch -
Cypress.browser() 🕓 🕓
Cypress.config() 🕓 🕓
Cypress.Cookies() -
Cypress.currentRetry() 🕓 🕓
Cypress.currentTest() 🕓 🕓
Cypress.log() 🕓 🕓
Cypress.dom() 🕓 🕓
Cypress.ensure() 🕓 🕓
Cypress.env() 🕓 🕓
Cypress.isBrowser() 🕓 🕓
Cypress.isCy() 🕓 🕓
Cypress.Keyboard() 🕓 🕓
Cypress.platform -
Cypress.require() 🕓 🕓
Cypress.Screenshot() 🕓 🕓
Cypress.SelectorPlayground() 🕓 🕓
Cypress.session() 🕓 🕓
Cypress.spec() 🕓 🕓
Cypress.testingType() 🕓 🕓
Cypress.version -

1. Forcing interaction

Cypress Playwright

Playwright force flag simply omits checks if element is visible and interactive, while cypress also emits an Event on the target element. Thus, in some cases, playwright action with force flag enabled, won't actually do anything.

2. Assertions

.should() assertions are supported (some of them are missing), but there are just too many of them for this list (the whole chai BDD list).

expect() assertions are not supported because their chained API is trickier to reimplement and as they rely too much on synchronous browser APIs.

3. Timeouts

Playwright doesn't provide timeout option for some methods (e.g. page.locator()), and instead uses global config for this cause. By default, playwright timeouts are much generous than cypress ones, so in some cases timeout option is ignored.

4. Command log

Cypress allows test cases to specify which commands and actions can be hidden from command log. Playwright has no comparable functionality, thus log option is ignored.

5. Visibility check

Cypress and playwright visibility checks are different. Cypress additionally checks if the element is inside scrollable or hidden overflow part of the parent element.