Browserflow
  • 👋🏽 Welcome to Browserflow
  • Guides
    • Building a flow
    • Running a flow
    • Debugging a flow
    • Sharing a flow
    • Automating Google websites
    • Keyboard shortcuts
    • Selectors
    • Variables
    • Input variables
    • Conditions
  • Browserflow Cloud
    • Running flows in the cloud
    • Loop Sheet flows
    • Saving files
    • Automating sites behind a login
    • API
    • Webhooks
    • Zapier
    • Troubleshooting
  • Reference
    • Browserflow commands
      • Interact with Page
        • Click
        • Type Text
        • Press Key
        • Scroll
        • Hover
        • Select Option
        • Set Date Input
        • Upload File
        • Handle Dialog
      • Extract Data
        • Get Element Text
        • Get Link URL
        • Get Page URL
        • Get Element Attribute
        • Get Element HTML
        • Get Clipboard
        • Save File
        • Take Screenshot
        • Generate PDF
      • Navigate
        • Visit
        • Go Back
        • Go Forward
        • Reload Page
      • Spreadsheet
        • Loop Spreadsheet Rows
        • Add Spreadsheet Row
        • Update Spreadsheet Row
        • Find Spreadsheet Row
      • Control Flow
        • Loop Elements
        • Loop Pages
        • Loop
        • Loop List Items
        • If
        • Else
        • While
        • End
        • Break
      • Tabs
        • Create Tab
        • Get Active Tab ID
        • Select Tab
        • Close Tab
      • Utilities
        • Run Script
        • Get Date
        • Wait
        • Wait for Element
        • Show Alert
        • Make HTTP Request
        • Assert
        • Run Flow
        • Comment
        • Solve Captcha
  • Support
    • Getting help
    • Common errors
  • Troubleshooting
    • Updating to the latest version
Powered by GitBook
On this page
  • Requirements
  • Limitations
  • Finding the file upload element

Was this helpful?

  1. Reference
  2. Browserflow commands
  3. Interact with Page

Upload File

PreviousSet Date InputNextHandle Dialog

Last updated 2 years ago

Was this helpful?

Upload file to a <input type="file"> element

Selector

  • for the <input type="file"> element

File path

  • Absolute path to the file

    • Example

      • macOS: /Users/dkthehuman/Downloads/profile.png

      • Windows: C:\Documents\Newsletters\Summer2018.pdf

    • If uploading a file that was downloaded earlier in the flow from a or command, pass in the variable set from the "Store downloaded file path in variable" field

Requirements

In order to use this command, you need to allow Browserflow to access files:

  1. Open chrome://extensions/

  2. Click "Details" for Browserflow

  3. Enable "Allow access to file URLs"

Limitations

Browserflow does not yet support uploading files into <input> elements inside iframes

Finding the file upload element

On many sites, the file upload element is hidden, which means that it's not possible to select it using the "Select" button. In these cases, you can use Recording Mode to have Browserflow detect the correct file upload element.

  1. Upload a file as you normally would

  2. Stop recording

  3. Clean up the recorded actions

    • If you clicked on a button to trigger the file selector, you can remove the Click command as it's not needed when using the Upload File command

Enter the for the file you'd like to upload (Browserflow cannot detect this automatically while recording)

Selector
Click
Save File
absolute path
Start recording