Cypress Tips July 2025
Can AI test a page like a human QA?
Can AI Notice That Something Is Wrong On The Page?
Yes.
I wrote a longish blog post “Does This Look Right To You, AI?“ that shows my system for using the existing functional Cypress tests to also check the page against application specifications via AI prompts. Using a combination of logged details and DOM snapshots, an existing test can provide plenty of checkpoints for us to ask an AI model “does this DOM satisfy the specs?”
Here is an example application that we “observe” during a test
If you were a real human QA, you would probably know the application specs or description. In my case, the spec is included in the image:
## Features - when the user enters a todo in the input field with `data-cy="add-todo"` and presses "Enter", the new todo item appears in the list of todos. Each todo should have attribute `data-cy="todo"` - no matter how the user enters the input, the list of todos should show each item using all uppercase letters
Now, let’s run the test once. My custom logger saves a detailed trace, that includes DOM snapshots.
Now we can feed this trace or its parts into an AI model following a prompt
Given the follow application feature descriptions confirm the web app shows the expected DOM HTML elements after each test step. {tood/readme.md} contents {join all steps} step: {step.name} {step.args.join(' ')} The HTML snapshot of the page after the step was executed is: {step.html}
Do you think a human QA would notice that the application does NOT show uppercase items in the list? Do you think even a simple AI model would notice this?
Let’s find out.
Looks like AI models are capable of inspecting HTML snapshots and test commands to figure out that our app does NOT match the intended Markdown specification. Easy win.
Let’s fix the application source code and run the test again. Now our DOM snapshots match the application specs.
Remember, we don’t need AI to be perfect - our functional tests should be deterministic and reliable. But the AI output can guide us to notice potential problems, just like a human QA could (given infinite time and patience) scan the page to notice any unexpected behavior.
Blog posts and videos
A few more AI+Cypress Testing blog posts from this month:
Happy Cypress Testing!





