chore: split context.ts into files (#284)
This commit is contained in:
parent
26779ceb20
commit
6e76d5e550
10 changed files with 344 additions and 289 deletions
|
|
@ -20,11 +20,10 @@ import os from 'os';
|
|||
import { z } from 'zod';
|
||||
|
||||
import { sanitizeForFilePath } from './utils';
|
||||
import { generateLocator } from '../context';
|
||||
import { defineTool } from './tool';
|
||||
import * as javascript from '../javascript';
|
||||
|
||||
import type * as playwright from 'playwright';
|
||||
import { defineTool } from './tool';
|
||||
|
||||
const snapshot = defineTool({
|
||||
capability: 'core',
|
||||
|
|
@ -268,6 +267,9 @@ const screenshot = defineTool({
|
|||
}
|
||||
});
|
||||
|
||||
export async function generateLocator(locator: playwright.Locator): Promise<string> {
|
||||
return (locator as any)._generateLocatorString();
|
||||
}
|
||||
|
||||
export default [
|
||||
snapshot,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue