Waltir
By: Waltir

Enable the Cypress Studio

Cover Image for Enable the Cypress Studio

Enable the Cypress Studio

Cypress studio is disabled by default. To enable the feature you’ll need to add the following line to your cypress.config.js file.

experimentalStudio: true,

giphy

Run the test

The test function can be called if you wish to see a working example. Scraper.test() This test simply makes a request to https://www.npmjs.com and extracts various datapoints located in the request response.

Extract data from your own site

We use the Scraper.getUrl() function to make a request to a website. Next we use the Scraper.parse() function to extract the data we want. The .parse function requires a few parameters. (data, starting point, ending point)

import { defineConfig } from "cypress";

export default defineConfig({
  e2e: {
    experimentalStudio: true,
    setupNodeEvents(on, config) {
      // implement node event listeners here
    }
  }
});

giphy

More Posts

Cover Image for Blocking Ad Traffic In Nightwatch JS
Blocking Ad Traffic In Nightwatch JS
Waltir
By: Waltir

Example showing how you can block unwanted ad traffic in your Nightwatch JS tests....

Cover Image for Blocking Ad Traffic In Cypress
Blocking Ad Traffic In Cypress
Waltir
By: Waltir

Example showing how you can block unwanted ad traffic in your Cypress tests....

Cover Image for Three Ways To Resize The Browser In Nightwatch
Three Ways To Resize The Browser In Nightwatch
Waltir
By: Waltir

Outlining the three different ways to resize the browser in Nightwatch JS with examples....

Cover Image for Happy Path VS Sad Path Testing
Happy Path VS Sad Path Testing
Waltir
By: Waltir

As a test engineer it is crucial that both happy path and sad path use cases have been considered and fully tested...