Skip to main content

Basic Test Case

In this tutorial we will walk through converting an existing script to use AI with Dev Tools.


A fully setup demo project is available to see the final result

Install Dependencies

If you haven't done so already, please install and devtools

npm install @devtools-ai/cypress-sdk

Integrate SmartDriver

To get started, simply import and add DevTools to your existing suite.


You will need to change "API_KEY" to the api key you get in the dashboard.

Add Dev Tools to your support and register it as a plugin

First add Dev Tools to your support files that you would like it to run in. Add the following line to whichever file you'd like.

import '@devtools-ai/cypress-sdk';

Import Dev Tools as a plugin and disable the Chrome security by adding the following:

const { defineConfig } = require("cypress");
const { registerSmartDriverTasks } = require('@devtools-ai/cypress-sdk/dist/plugins');
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
registerSmartDriverTasks(on, config);
// implement node event listeners here
return config;
chromeWebSecurity: false,

Add your API key

Create a new file in the project root called smartdriver.config.js

module.exports = {
apiKey: '??API_KEY??',

Sample Test

As an example of smartDriver in action, we will use a basic test case that goes to Github and enters a username for hello world.

describe("Should be able to login", () => {
it("Login", () => {

You can write that same test using DevTools as follows AI

describe("Should be able to login", () => {
it("Login", () => {