
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,
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
}
}
});
More Posts
Blocking Ad Traffic In Nightwatch JS

Example showing how you can block unwanted ad traffic in your Nightwatch JS tests....
Blocking Ad Traffic In Cypress

Example showing how you can block unwanted ad traffic in your Cypress tests....
Three Ways To Resize The Browser In Nightwatch

Outlining the three different ways to resize the browser in Nightwatch JS with examples....
Happy Path VS Sad Path Testing

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