@screept/cypress v1.1.15
screept-ai/cypress-recorder
Create Cypress tests in seconds for free
- No registration.
- No coding skills required.
- Create tests 30x faster directly in the Cypress environment.
To start using Screept in your project
Install the module.
npm install -D @screept/cypress
Configure your project to use Screept plugin
npx screept-init
or use manual configuration
Try free version now
To get started, simply install the plugin without API key and begin recording your tests effortlessly.\ With this powerful tool, you can easily create comprehensive tests that involve various actions such as clicks, typing, and assertions.\ The best part is that the plugin automatically generates selectors for you, streamlining the process even further.
Demo project
- Get demo project on GitHub and try all advanced features right away.
- It uses Cypress 12 with preinstalled plugin, connected to a demo account.
- It will show you how to use autoheal, visual testing, email testing, file upload, variables and more.
- Screept Demo Project
If you need advanced testing tools, try our paid version
AI selectors and automatic test fixing
- We collect a variety of data that enables us to identify the correct element, even if your user interface undergoes changes.
- If your selector is not working anymore we will automatically fix it for you.
Example
Your test contains broken selector:
cy.ai.get('#broken-selector', {i: 1}).type('{{generate.email}}');
AI will find the right element, generate new selector and create fixed test for you:
cy.ai.get('[type="email"]', {i: 1}).type('{{generate.email}}');
Email testing
- You can test receiving of emails in your tests.
cy.ai.get('[type="email"]', {i: 1}).type('{{generate.email}}');
cy.ai.get('button', {i: 2}).click();
cy.ai.openEmail('Verify your email'); // Open email with subject "Verify your email"
cy.ai.get('a', {i: 3, iframe: '.data-box-content>iframe'}).click(); // Click on verification link
cy.ai.closeEmail() // Close the email
PDF testing
- Download and open PDF files in your tests.
- You can add assertions to check the content of the PDF file.
cy.ai.get('(//*[contains(@class,"MBeuO")])[1]', {i:6}).click();
cy.ai.openPdf('sample');
cy.ai.get('(//*[@role="presentation"])[1]', {i:8, iframe: 'iframe#pf-pdf-iframe'}).should('include.text', 'A Simple PDF File');
cy.ai.closePdf();
Visual testing
- Compare screenshots of your application with the reference image.
cy.visit('https://www.google.com/');
cy.ai.get('#logo', {i:2})
.visualCheck('https://preflightuploadsdev.blob.core.windows.net/uploads/bf026e27-e3b9-49f9-904c-bd91bddf539a', 15);
File upload testing
- Your uploaded files will be stored in cloud and downloaded to your test environment when needed.
cy.visit('https://www.dropzone.dev/#');
cy.ai.get('.dropzone', {i:2}).click();
cy.ai.get('input', {i:3})
.fileUpload({filename: 'testImage.jpg', url: 'https://preflightuploadsdev.blob.core.windows.net/uploads/66ca812f-9dd9-4939-87f3-933c9192551b'});
cy.ai.get('(//*[contains(@class,"dz-filename")]/span)[2]', {i:4})
.should('include.text', 'testImage.jpg');
Generic test data
- The test will automatically generate random data for you.
cy.ai.get('(//*[@type="text"])[1]', {i: 3}).type('{{name.firstName}}');
- This code will write random name to the input field.
XPath selector and iFrames support
Test run recording, statistics and simple test edit in modern UI
- You can keep track of test runs in your Screept.ai account.
Manual plugin installation
1. Add the following line to cypress/support/commands.js
.
require('@screept/cypress'); // Import Screept.ai plugin
2. Import plugin
For Cypress 10 and above
Add the following lines to cypress.config.js
.
const { defineConfig } = require('cypress')
const screeptAiSetupNode = require("@screept/cypress/cyNodeSetup");
module.exports = defineConfig({
env: {
SCREEPT_API_KEY: '[YOUR_API_KEY]'
},
e2e: {
setupNodeEvents(on, config) {
screeptAiSetupNode(on); // Import Screept.ai plugin
}
}
})
3. Create an account on screept.ai
- The API key will be generated for you automatically after creating account.
Alternatively you can go to Account Settings / API to generate a new one.
4. Set API key in your test environment
- You can set key in code like
Cypress.ScreeptApiKey = '[YOUR_API_KEY]';
- Or set Cypress env in your
cypress.config.js
file.
env: {
SCREEPT_API_KEY: '[YOUR_API_KEY]'
}
Open Cypress runner and start recording your tests
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago