File Uploads in Your Tests

Ghost Inspector allows to you upload files using file inputs

Search our documentation:

Toggle Documentation Menu

File Uploads in Your Tests

Ghost Inspector supports uploading files via <input type="file"> elements. If you record a test that uploads a file, you will see a notice on your test that looks like this:

File upload notice

Our test recorder cannot yet capture your files. However, we can detect the upload and give you the option to specify the file within the Ghost Inspector application. To do so, simply edit your test steps and find the step that uploads the file. Your step now includes an “Upload File…” button that allows you to include your file with the test.

File upload step

After uploading your file, the test step will display the details of your file and upload it properly when executing your test.

File upload step

A few things worth noting when uploading files within your tests: