No Selenium. No XPath. No CSS selectors. Just natural language — and an AI agent that browses your site like a real human. Here's exactly how I built it, what broke, and what Nova Act can actually do beyond a simple smoke test.
I've been building with Agentic AI on AWS for a while — Bedrock Agents, Strands, AgentCore. When Amazon released Nova Act, I wanted to try something personal: could I use it to automatically test my own website? Turns out yes — and it's far more interesting than any test automation I've written before.
Nova Act is Amazon's AI model built to take actions inside a web browser. Unlike Selenium, Playwright, or Cypress — which rely on DOM selectors — Nova Act understands pages visually and semantically. You describe what you want in plain English, and it figures out how to do it.
Traditional: driver.find_element(By.XPATH, '//a[@class="blog-link"]').click()
Nova Act: nova.act("Find a blog link and click it")
Before jumping into code, it's worth understanding what Nova Act is built for. This isn't just a QA tool — it's a production-grade agentic framework for any workflow that involves a browser and doesn't have an API.
One of the most powerful patterns from the official AWS QA sample repo is using JSON files as test cases. Instead of Python for every test, you define steps in a simple JSON schema and Nova Act executes them. Non-developers can write tests. AI tools like Kiro or Amazon Q CLI can generate the JSON automatically by analyzing your codebase.
Here's a JSON task file based on the exact 4 acts I ran against vishnurachapudi.com:
{
"testId": "VR-SMOKE-01",
"testName": "Vishnu Site Smoke Test",
"description": "Verify homepage loads, name is visible, blog navigation works",
"startingUrl": "https://www.vishnurachapudi.com",
"testSteps": [
{
"stepId": "step-01",
"action": "Wait for page to load and confirm homepage is visible",
"expectedResult": "Homepage loads successfully and content is visible"
},
{
"stepId": "step-02",
"action": "Find my name or title heading on the page",
"expectedResult": "Vishnu Rachapudi heading and 14x AWS Certified title are visible"
},
{
"stepId": "step-03",
"action": "Find a blog or project link and click it",
"expectedResult": "Page navigates to the blog section successfully"
},
{
"stepId": "step-04",
"action": "Confirm content is visible on this new page",
"expectedResult": "Blog posts with headings and dates are visible"
}
]
}
The Python runner that loads and executes these JSON files:
import json
from nova_act import NovaAct, workflow
@workflow(workflow_definition_name="json-driven-tests", model_id="nova-act-latest")
def run_test_from_json(test_file: str):
with open(test_file) as f:
test = json.load(f)
print(f"Running: {test['testName']}")
with NovaAct(
starting_page=test["startingUrl"],
ignore_https_errors=True
) as nova:
for step in test["testSteps"]:
prompt = step["action"] + ". Expected: " + step["expectedResult"]
result = nova.act(prompt)
print(f"✓ {step['stepId']}: {result}")
# Run it
run_test_from_json("vishnurachapudi_smoke_test.json")
Combined with pytest-xdist, each JSON test file runs in its own isolated session in parallel. A 15-test suite that would take 15 minutes sequentially finishes in under 2 minutes. The official aws-samples QA repo has the full framework including HTML report generation.
Requires Python 3.10+ on macOS Sierra+, Ubuntu 22.04+, Windows 10+, or WSL2.
pip install nova-act
aws configure
Go to nova.amazon.com/act → Dev Tools → Get API Keys. This key authenticates the SDK with the Nova Act AWS service.
Four natural language acts — each validating a different part of vishnurachapudi.com. No XPath. No element IDs.
from nova_act import NovaAct, workflow
@workflow(workflow_definition_name="my-demo-workflow", model_id="nova-act-latest")
def my_workflow(prompt):
with NovaAct(
starting_page="https://www.vishnurachapudi.com",
ignore_https_errors=True
) as nova:
# Act 1: Does the homepage load?
result1 = nova.act("Wait for page to load and confirm homepage is visible")
print("✓ Homepage:", result1)
# Act 2: Is my name/title present?
result2 = nova.act("Find my name or title heading on the page")
print("✓ Content:", result2)
# Act 3: Can we navigate to the blog?
result3 = nova.act("Find a blog or project link and click it")
print("✓ Navigation:", result3)
# Act 4: Is blog content visible?
result4 = nova.act("Confirm content is visible on this new page")
print("✓ Page check:", result4)
if __name__ == "__main__":
my_workflow("test vishnurachapudi.com")
Nova Act runs an SSL certificate pre-check before opening the browser. If the domain can't be resolved or the cert can't be verified, it fails immediately with InvalidCertificate — before any browser even opens. Adding ignore_https_errors=True bypassed this and the run succeeded.
Nova Act doesn't need XPath or CSS selectors. Visual and semantic understanding means UI changes don't break your tests. This is the biggest practical difference from Selenium.
The agent shows its reasoning. Every act has an "Agent thinking" trace — you see exactly why it passed or failed. Far easier to debug than a Selenium stack trace.
JSON task files democratize testing. Non-developers write tests in plain JSON. AI tools like Kiro auto-generate them from your codebase.
33.6s for a 4-step smoke test. Each act takes 5–7s as the model thinks and acts. For a deploy-time smoke test this is very reasonable — especially when you can parallelize.
Part 1 runs the browser locally. Part 2 moves everything to the cloud using Amazon Bedrock AgentCore Browser — a fully managed, cloud-hosted browser session in AWS. Your Python code stays identical; you just swap in a WebSocket endpoint. Sessions record to S3, you get live view in the console, and you can run tests in parallel at scale.