rayrun
v0.0.0-development
Published
Playwright utilities
Downloads
3
Readme
Playwright Utilities
Utilities for working with @playwright/test
.
Utilities
createDataTransfer
Used to create a DataTransfer. Useful when you want to perform drag and drop operations.
createDataTransfer = (args: {
page: Page;
filePath: string;
fileName: string;
fileType: string;
}): Promise<DataTransfer>;
Usage:
import { createDataTransfer } from "playwright-utilities";
import { resolve } from "node:path";
await createDataTransfer({
filePath: resolve(__dirname, "foo.png"),
fileName: "foo.png",
fileType: "image/png",
});