1.0.1 • Published 5 months ago

cypress-typescript-framework v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

cypress-typescript-framework

Differences between Cypress and Playwright frameworks:

the .containsClick() and .containsDoubleClick() methods work differently. In Cypress, you can pass pretty much whatever you want in the argument and Cypress will search the DOM. It can/will also keep the selected element as the subject for chaining purposes. Playwright does not have an equivalent method to Cypress' .contains method, therefore the only content that can be searched is the text value.

Aliases Alias based methods (ie aliasClick) are not available in Playwright due to the lack of alias functionality.

Intercepts While the alias pieces for intercepts will not work in Playwright, intercepting network requests IS available as hardcoded methods

Verifying and Chaining Since Playwright uses the expect family of asserts rather than should (and chai would be rather bothersome to integrate at this time), asserts--especially chained asserts--will not work the same. Playwright can use toHaveAttribute and toContainText to get around some of the verifying, but it does not have the same coverage as Cypress