QA Automation Labs

Execute Cypress Test Cases in WebKit(Safari)

image-8-1024x230

Execute Cypress Test Cases in WebKit(Safari)

This blog covers how we can execute Cypress Test cases in WebKit(Safari)

In version 10.8.0, Cypress.io team has introduced the support of the WebKit(Safari) browser

Cypress has experimental support for WebKit, Safari’s browser engine. Testing your app with WebKit is representative of how your app would run in Safari. 

To run test cases in WebKit(Safari) we have to install a new version of cypress 10.8.0 Or have to upgrade the existing version (if the old version is already installed)

Installation Steps 

Step 1:

Install / Upgrade Cypress version 10.8.0 

Commands npm install --save-dev [email protected] 

Step 2:

Add experimentalWebKitSupport: true to your configuration to enable the experiment.

Please see the below screenshot, In cypress. config.js we need to add the above command

Step 3:

Install the playwright-webkit NPM package in your repo to acquire WebKit itself: npm install --save-dev playwright-webkit.

Execute Test Cases

Run commands yarn run cypress openbelow screen opens

From Above Screen Click on E2E Testing below screen is open. 

In the below screen we can see the WebKit browser as an option is displaying

Click on WebKit browser from the above screen existing test cases are open

Click on the test case that we want to run, and the test case starts executing in WebKit.

Leave a Comment

Your email address will not be published. Required fields are marked *

Recent Posts

Let’s Play with Cypress Feature “Test Replay”

Problem Statement Before Cypress v13, test failures in CI have historically been captured through screenshots, videos, and stack trace outputs, b
Read More

Handling Shadow DOM Using Cypress

The idea of componentization has completely changed how we design and maintain user interfaces in the field of web development. The advent of Shadow D
Read More

Gear up for upcoming Conferences of 2024! ✨✨

Gear up for our upcoming Conferences of 2024! ✨ ✨ #TheTestTribe #SoftwareTesting #Testers #Community #Worqference #Worqference2024 #QonfX 
Read More