> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/browser/open-file.md).

# Open File

Open file loads a file into the browser tab. Use it after a download or [Generate file](/test-steps/runner/generate-file.md) when the journey needs to view or assert on the file itself.

![Open file Test Step](https://app.does.qa/screenshots/node/browser_open_file.png)

## When to use it

* Open the last download after a save or export on the page.
* Open a file created with [Generate file](/test-steps/runner/generate-file.md).
* Prefer [File](/test-steps/action/file.md) when the app expects an upload into a file input instead.

## Example Flow

Generate the file, then open it in the browser.

![Generate file then Open file](/files/9DfmnoH4W9pL00h7hNwZ)

## Configure

### Basics

| Field              | What to set                                     |
| ------------------ | ----------------------------------------------- |
| **File**           | `Last Downloaded` (default) or `Generated File` |
| **Generated File** | The generated file when File is Generated File  |

### Advanced

| Field                                 | What to set                                          |
| ------------------------------------- | ---------------------------------------------------- |
| **Status on fail**                    | [Failed Status](/test-step-options/failed-status.md) |
| **When should screenshots be taken?** | `Always` (default) or `On Failures`                  |

{% hint style="info" %}
**Pro tip:** Place Open file after the download or generate step in the same Test Case so Last Downloaded or Generated File points at the right content.
{% endhint %}

## Related

* [Generate file](/test-steps/runner/generate-file.md)
* [File](/test-steps/action/file.md)
* [Test file uploads and downloads](/guides/test-file-uploads-and-downloads.md)
* [Browser](/test-steps/browser.md)

**Tags:** `browser`, `open`, `file`
