@wix-pilot/core
Version:
A flexible plugin that drives your tests with human-written commands, enhanced by the power of large language models (LLMs)
65 lines (47 loc) • 1.57 kB
Markdown
# -pilot/core 🎯
> Core engine for Wix Pilot - Translating natural language into test actions
## Overview
The `-pilot/core` package is the heart of Wix Pilot, responsible for:
- Orchestrating test execution
- Managing LLM interactions
- Providing the main API interface
- Handling driver registration and lifecycle
- Configurable logging system
## Installation
```bash
# npm
npm install --save-dev -pilot/core
# yarn
yarn add -D -pilot/core
```
## Pilot Usage
```typescript
import { pilot } from '@wix-pilot/core';
import { PuppeteerDriver } from '@wix-pilot/puppeteer';
import { CustomPromptHandler } from './custom-prompt-handler';
// Initialize Pilot with your preferred driver and a custom prompt handler
pilot.init({
driver: new PuppeteerDriver(),
promptHandler: new CustomPromptHandler(),
});
// Start a new Pilot flow
pilot.start();
// Run your automated flow
await pilot.perform(
'Navigate to the homepage',
'Click the login button',
'The login form should be visible'
);
// End the flow
pilot.end();
```
## Autopilot Usage
Autopilot uses an agentic approach to perform goal-based automation flows.
```typescript
await pilot.autopilot('Register with a new account');
```
## Related Packages
- [-pilot/puppeteer](../drivers/puppeteer) - Puppeteer driver for web testing
- [-pilot/playwright](../drivers/playwright) - Playwright driver for modern web testing
- [-pilot/detox](../drivers/detox) - Detox driver for React Native testing
- [-pilot/appium](../drivers/appium) - Appium driver for mobile testing