diff --git a/docs/sources/k6/next/javascript-api/k6-browser/elementhandle/setinputfiles.md b/docs/sources/k6/next/javascript-api/k6-browser/elementhandle/setinputfiles.md index 09a27ffad6..96c95b6d0a 100644 --- a/docs/sources/k6/next/javascript-api/k6-browser/elementhandle/setinputfiles.md +++ b/docs/sources/k6/next/javascript-api/k6-browser/elementhandle/setinputfiles.md @@ -14,7 +14,7 @@ To work with local files on the file system, use the [experimental fs module](ht | file | object | `null` | This is a required parameter. | | file.name | string | `''` | The name of the file. For example, `file.txt`. | | file.mimeType | string | `''` | The type of the file content. For example, `text/plain`. | -| file.buffer | ArrayBuffer | `[]` | Base64 encoded content of the file. | +| file.buffer | string | `''` | Base64 encoded content of the file. | | options | object | `null` | This is an optional parameter. | | options.noWaitAfter | boolean | `false` | If set to `true` and a navigation occurs from performing this action, it will not wait for it to complete. | | options.timeout | number | `30000` | Maximum time in milliseconds. Pass `0` to disable the timeout. Default is overridden by the `setDefaultTimeout` option on [BrowserContext](https://grafana.com/docs/k6//javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6//javascript-api/k6-browser/page/). | @@ -67,7 +67,7 @@ export default async function () { // The file is set to the input element with the id "upload". await eh.setInputFiles({ name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode('hello world'), }); } finally { @@ -128,7 +128,7 @@ export default async function () { // The file is set to the input element with the id "upload". await eh.setInputFiles({ name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode(buffer), }); } finally { diff --git a/docs/sources/k6/next/javascript-api/k6-browser/frame/setinputfiles.md b/docs/sources/k6/next/javascript-api/k6-browser/frame/setinputfiles.md index 847bc3fa8e..f2425c4554 100644 --- a/docs/sources/k6/next/javascript-api/k6-browser/frame/setinputfiles.md +++ b/docs/sources/k6/next/javascript-api/k6-browser/frame/setinputfiles.md @@ -15,7 +15,7 @@ To work with local files on the file system, use the [experimental fs module](ht | file | object | `null` | This is a required parameter. | | file.name | string | `''` | The name of the file. For example, `file.txt`. | | file.mimeType | string | `''` | The type of the file content. For example, `text/plain`. | -| file.buffer | ArrayBuffer | `[]` | Base64 encoded content of the file. | +| file.buffer | string | `''` | Base64 encoded content of the file. | | options | object | `null` | This is an optional parameter. | | options.noWaitAfter | boolean | `false` | If set to `true` and a navigation occurs from performing this action, it will not wait for it to complete. | | options.timeout | number | `30000` | Maximum time in milliseconds. Pass `0` to disable the timeout. Default is overridden by the `setDefaultTimeout` option on [BrowserContext](https://grafana.com/docs/k6//javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6//javascript-api/k6-browser/page/). | @@ -62,7 +62,7 @@ export default async function () { // The file is set to the input element with the id "upload". frame.setInputFiles('input[id="upload"]', { name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode('hello world'), }); } finally { @@ -121,9 +121,9 @@ export default async function () { const buffer = await readAll(file); // The file is set to the input element with the id "upload". - frame.setInputFiles({ + frame.setInputFiles('input[id="upload"]', { name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode(buffer), }); } finally { diff --git a/docs/sources/k6/next/javascript-api/k6-browser/page/setinputfiles.md b/docs/sources/k6/next/javascript-api/k6-browser/page/setinputfiles.md index 3a7bcd69e7..922023f122 100644 --- a/docs/sources/k6/next/javascript-api/k6-browser/page/setinputfiles.md +++ b/docs/sources/k6/next/javascript-api/k6-browser/page/setinputfiles.md @@ -15,7 +15,7 @@ To work with local files on the file system, use the [experimental fs module](ht | file | object | `null` | This is a required parameter. | | file.name | string | `''` | The name of the file. For example, `file.txt`. | | file.mimeType | string | `''` | The type of the file content. For example, `text/plain`. | -| file.buffer | ArrayBuffer | `[]` | Base64 encoded content of the file. | +| file.buffer | string | `''` | Base64 encoded content of the file. | | options | object | `null` | This is an optional parameter. | | options.noWaitAfter | boolean | `false` | If set to `true` and a navigation occurs from performing this action, it will not wait for it to complete. | | options.timeout | number | `30000` | Maximum time in milliseconds. Pass `0` to disable the timeout. Default is overridden by the `setDefaultTimeout` option on [BrowserContext](https://grafana.com/docs/k6//javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6//javascript-api/k6-browser/page/). | @@ -66,7 +66,7 @@ export default async function () { // The file is set to the input element with the id "upload". await page.setInputFiles('input[id="upload"]', { name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode('hello world'), }); } finally { @@ -123,9 +123,9 @@ export default async function () { const buffer = await readAll(file); // The file is set to the input element with the id "upload". - await page.setInputFiles({ + await page.setInputFiles('input[id="upload"]', { name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode(buffer), }); } finally { diff --git a/docs/sources/k6/v1.6.x/javascript-api/k6-browser/elementhandle/setinputfiles.md b/docs/sources/k6/v1.6.x/javascript-api/k6-browser/elementhandle/setinputfiles.md index 09a27ffad6..96c95b6d0a 100644 --- a/docs/sources/k6/v1.6.x/javascript-api/k6-browser/elementhandle/setinputfiles.md +++ b/docs/sources/k6/v1.6.x/javascript-api/k6-browser/elementhandle/setinputfiles.md @@ -14,7 +14,7 @@ To work with local files on the file system, use the [experimental fs module](ht | file | object | `null` | This is a required parameter. | | file.name | string | `''` | The name of the file. For example, `file.txt`. | | file.mimeType | string | `''` | The type of the file content. For example, `text/plain`. | -| file.buffer | ArrayBuffer | `[]` | Base64 encoded content of the file. | +| file.buffer | string | `''` | Base64 encoded content of the file. | | options | object | `null` | This is an optional parameter. | | options.noWaitAfter | boolean | `false` | If set to `true` and a navigation occurs from performing this action, it will not wait for it to complete. | | options.timeout | number | `30000` | Maximum time in milliseconds. Pass `0` to disable the timeout. Default is overridden by the `setDefaultTimeout` option on [BrowserContext](https://grafana.com/docs/k6//javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6//javascript-api/k6-browser/page/). | @@ -67,7 +67,7 @@ export default async function () { // The file is set to the input element with the id "upload". await eh.setInputFiles({ name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode('hello world'), }); } finally { @@ -128,7 +128,7 @@ export default async function () { // The file is set to the input element with the id "upload". await eh.setInputFiles({ name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode(buffer), }); } finally { diff --git a/docs/sources/k6/v1.6.x/javascript-api/k6-browser/frame/setinputfiles.md b/docs/sources/k6/v1.6.x/javascript-api/k6-browser/frame/setinputfiles.md index 847bc3fa8e..f2425c4554 100644 --- a/docs/sources/k6/v1.6.x/javascript-api/k6-browser/frame/setinputfiles.md +++ b/docs/sources/k6/v1.6.x/javascript-api/k6-browser/frame/setinputfiles.md @@ -15,7 +15,7 @@ To work with local files on the file system, use the [experimental fs module](ht | file | object | `null` | This is a required parameter. | | file.name | string | `''` | The name of the file. For example, `file.txt`. | | file.mimeType | string | `''` | The type of the file content. For example, `text/plain`. | -| file.buffer | ArrayBuffer | `[]` | Base64 encoded content of the file. | +| file.buffer | string | `''` | Base64 encoded content of the file. | | options | object | `null` | This is an optional parameter. | | options.noWaitAfter | boolean | `false` | If set to `true` and a navigation occurs from performing this action, it will not wait for it to complete. | | options.timeout | number | `30000` | Maximum time in milliseconds. Pass `0` to disable the timeout. Default is overridden by the `setDefaultTimeout` option on [BrowserContext](https://grafana.com/docs/k6//javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6//javascript-api/k6-browser/page/). | @@ -62,7 +62,7 @@ export default async function () { // The file is set to the input element with the id "upload". frame.setInputFiles('input[id="upload"]', { name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode('hello world'), }); } finally { @@ -121,9 +121,9 @@ export default async function () { const buffer = await readAll(file); // The file is set to the input element with the id "upload". - frame.setInputFiles({ + frame.setInputFiles('input[id="upload"]', { name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode(buffer), }); } finally { diff --git a/docs/sources/k6/v1.6.x/javascript-api/k6-browser/page/setinputfiles.md b/docs/sources/k6/v1.6.x/javascript-api/k6-browser/page/setinputfiles.md index 3a7bcd69e7..922023f122 100644 --- a/docs/sources/k6/v1.6.x/javascript-api/k6-browser/page/setinputfiles.md +++ b/docs/sources/k6/v1.6.x/javascript-api/k6-browser/page/setinputfiles.md @@ -15,7 +15,7 @@ To work with local files on the file system, use the [experimental fs module](ht | file | object | `null` | This is a required parameter. | | file.name | string | `''` | The name of the file. For example, `file.txt`. | | file.mimeType | string | `''` | The type of the file content. For example, `text/plain`. | -| file.buffer | ArrayBuffer | `[]` | Base64 encoded content of the file. | +| file.buffer | string | `''` | Base64 encoded content of the file. | | options | object | `null` | This is an optional parameter. | | options.noWaitAfter | boolean | `false` | If set to `true` and a navigation occurs from performing this action, it will not wait for it to complete. | | options.timeout | number | `30000` | Maximum time in milliseconds. Pass `0` to disable the timeout. Default is overridden by the `setDefaultTimeout` option on [BrowserContext](https://grafana.com/docs/k6//javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6//javascript-api/k6-browser/page/). | @@ -66,7 +66,7 @@ export default async function () { // The file is set to the input element with the id "upload". await page.setInputFiles('input[id="upload"]', { name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode('hello world'), }); } finally { @@ -123,9 +123,9 @@ export default async function () { const buffer = await readAll(file); // The file is set to the input element with the id "upload". - await page.setInputFiles({ + await page.setInputFiles('input[id="upload"]', { name: 'file.txt', - mimetype: 'text/plain', + mimeType: 'text/plain', buffer: encoding.b64encode(buffer), }); } finally {