UNPKG

cucumber-ai

Version:

Write automated tests using natural language

35 lines 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AgentWorld = void 0; const cucumber_1 = require("@cucumber/cucumber"); const context_1 = require("./context"); class AgentWorld extends cucumber_1.World { constructor(options) { super(options); this._context = new context_1.Context({ headless: this.parameters.headless, logging: this.parameters.logging, disableCache: this.parameters.disableCache, }); } get driver() { return this._context.getDriver(); } get context() { return this._context; } async init() { await this.context.init(); } async executeStep(stepText) { await this.context.getStepAgent().executeStep(stepText); } async executeActions(actions, args = {}) { await this.context.getActionAgent().executeActions(actions, args); } async quit() { await this.context.quit(); } } exports.AgentWorld = AgentWorld; //# sourceMappingURL=agent.world.js.map