@intuned/sdk-dev-types
Advanced tools
Comparing version 1.0.22-better-download.3 to 1.0.22-better-download.4
@@ -251,2 +251,65 @@ import type { Page, Locator } from "@intuned/playwright-core"; | ||
/** | ||
* Downloads a file from a URL. | ||
* | ||
* @param {Page} page - The Playwright Page object. | ||
* @param {string} url - The URL of the file to download. | ||
* @returns {Promise<Download>} A promise that resolves to a Download object. | ||
* | ||
* @example | ||
* ```typescript | ||
* import { downloadFile } from "@intuned/sdk/files"; | ||
* | ||
* const download = await downloadFile(page, "https://example.com/file.pdf"); | ||
* console.log(await download.path()); | ||
* ``` | ||
*/ | ||
export declare function downloadFile( | ||
page: Page, | ||
url: string | ||
): Promise<Download>; | ||
/** | ||
* Downloads a file using the specified locator. | ||
* | ||
* @param {Page} page - The Playwright Page object. | ||
* @param {Locator} locator - The locator of the element to click to download the file. | ||
* @returns {Promise<Download>} A promise that resolves to a Download object. | ||
* | ||
* @example | ||
* ```typescript | ||
* import { downloadFile } from "@intuned/sdk/files"; | ||
* | ||
* const download = await downloadFile(page, page.locator(".download_button")); | ||
* console.log(await download.path()); | ||
* ``` | ||
*/ | ||
export declare function downloadFile( | ||
page: Page, | ||
locator: Locator | ||
): Promise<Download>; | ||
/** | ||
* Downloads a file using the specified trigger function. | ||
* | ||
* @param {Page} page - The Playwright Page object. | ||
* @param {(page: Page) => Promise<void>} trigger - The function to trigger the download. | ||
* @returns {Promise<Download>} A promise that resolves to a Download object. | ||
* | ||
* @example | ||
* ```typescript | ||
* import { downloadFile } from "@intuned/sdk/files"; | ||
* | ||
* const download = await downloadFile(page, async (page) => { | ||
* await page.locator(".download_button").click(); | ||
* }); | ||
* | ||
* console.log(await download.path()); | ||
* ``` | ||
*/ | ||
export declare function downloadFile( | ||
page: Page, | ||
trigger: (page: Page) => Promise<void> | ||
): Promise<Download>; | ||
/** | ||
* Downloads a file using the specified strategy. | ||
@@ -330,65 +393,2 @@ * | ||
/** | ||
* Downloads a file from a URL. | ||
* | ||
* @param {Page} page - The Playwright Page object. | ||
* @param {string} url - The URL of the file to download. | ||
* @returns {Promise<Download>} A promise that resolves to a Download object. | ||
* | ||
* @example | ||
* ```typescript | ||
* import { downloadFile } from "@intuned/sdk/files"; | ||
* | ||
* const download = await downloadFile(page, "https://example.com/file.pdf"); | ||
* console.log(await download.path()); | ||
* ``` | ||
*/ | ||
export declare function autoDownloadFile( | ||
page: Page, | ||
url: string | ||
): Promise<Download>; | ||
/** | ||
* Downloads a file using the specified locator. | ||
* | ||
* @param {Page} page - The Playwright Page object. | ||
* @param {Locator} locator - The locator of the element to click to download the file. | ||
* @returns {Promise<Download>} A promise that resolves to a Download object. | ||
* | ||
* @example | ||
* ```typescript | ||
* import { downloadFile } from "@intuned/sdk/files"; | ||
* | ||
* const download = await downloadFile(page, page.locator(".download_button")); | ||
* console.log(await download.path()); | ||
* ``` | ||
*/ | ||
export declare function autoDownloadFile( | ||
page: Page, | ||
locator: Locator | ||
): Promise<Download>; | ||
/** | ||
* Downloads a file using the specified trigger function. | ||
* | ||
* @param {Page} page - The Playwright Page object. | ||
* @param {(page: Page) => Promise<void>} trigger - The function to trigger the download. | ||
* @returns {Promise<Download>} A promise that resolves to a Download object. | ||
* | ||
* @example | ||
* ```typescript | ||
* import { downloadFile } from "@intuned/sdk/files"; | ||
* | ||
* const download = await downloadFile(page, async (page) => { | ||
* await page.locator(".download_button").click(); | ||
* }); | ||
* | ||
* console.log(await download.path()); | ||
* ``` | ||
*/ | ||
export declare function autoDownloadFile( | ||
page: Page, | ||
trigger: (page: Page) => Promise<void> | ||
): Promise<Download>; | ||
/** | ||
* Represents a downloaded file. | ||
@@ -395,0 +395,0 @@ * |
{ | ||
"name": "@intuned/sdk-dev-types", | ||
"version": "1.0.22-better-download.3", | ||
"version": "1.0.22-better-download.4", | ||
"description": "intuned runner types", | ||
@@ -5,0 +5,0 @@ "author": "Intuned Team", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71589