Skip to main content

Framework Support

TestivAI works with any framework that can control Chrome. One SDK, every framework.

Supported Frameworks

LanguageFrameworkCapture CallRun Command
JavaScriptCypresscy.witness('name')testivai run "cypress run --browser chrome"
JavaScriptSeleniumawait witness(driver, 'name')testivai run "npx jest tests/"
JavaScriptWebdriverIOawait browser.witness('name')testivai run "npx wdio run wdio.conf.js"
JavaScriptPuppeteerawait witness(page, 'name')testivai run "npx jest tests/"
JavaScriptPlaywrightDedicated SDKnpx playwright test
PythonSelenium + pytestwitness(driver, 'name')testivai run "pytest tests/ -v"
PythonSelenium + unittestwitness(self.driver, 'name')testivai run "python -m unittest discover"
PythonRobot FrameworkWitness nametestivai run "robot tests/"
JavaSelenium + JUnit 5TestivAIWitness.witness(driver, "name")testivai run "mvn test"
JavaSelenium + TestNGTestivAIWitness.witness(driver, "name")testivai run "mvn test"
RubyRSpec + Capybarawitness 'name'testivai run "bundle exec rspec"
RubyCucumber + CapybaraStep: the "name" page looks correcttestivai run "bundle exec cucumber"

Pick your framework from the sidebar to see full setup instructions and a working example.


How the Capture Works

All frameworks call the same underlying mechanism — a global window.testivaiWitness() function injected by the Witness SDK via Chrome's remote debugging interface. The generated helper file wraps this call in a framework-idiomatic way:

  • JS frameworksexecuteScript / evaluate wrapper
  • Pythondriver.execute_script() wrapper
  • JavaJavascriptExecutor wrapper
  • Rubyexecute_script wrapper
  • Cypress — native cy.window().invoke() custom command
  • Robot FrameworkExecute Javascript keyword wrapper

Chrome Requirement

All non-Playwright frameworks require Chrome to start with --remote-debugging-port=9222. The testivai init wizard generates configuration to do this automatically for each framework.

Playwright

Playwright has its own browser integration built in. Use @testivai/witness-playwright instead of this SDK.