Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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/<K6_VERSION>/javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/). |
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<K6_VERSION>/javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/). |
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<K6_VERSION>/javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/). |
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<K6_VERSION>/javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/). |
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<K6_VERSION>/javascript-api/k6-browser/browsercontext/) or [Page](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/). |
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Loading
Loading