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
  • Generating selectors
  • Recording actions
  • Using the "Select" button
  • Writing your own selector

Was this helpful?

  1. Guides

Selectors

PreviousKeyboard shortcutsNextVariables

Last updated 2 years ago

Was this helpful?

Selectors allow you to identify elements on the page when extracting data or interacting with the page.

For example, if you want Browserflow to click on a certain button on the page, it needs to know which button to click. The selector button:contains("Submit") would tell Browserflow to click on a <button> HTML element with the text "Submit".

Generating selectors

Ways to generate selectors:

  1. Recording actions

  2. Using the "Select" button

  3. Writing your own selector

Recording actions

When , Browserflow will automatically generate selectors for the elements you interact with.

Using the "Select" button

In the Browserflow editor, you'll find a "Select" button next to the selector field in any command that requires a selector:

Clicking the "Select" button will trigger the element picker on the current page. When you click on an element, Browserflow will automatically generate a selector for that element.

Writing your own selector

    • e.g. A button with the text "Submit": button:contains("Submit")

    • e.g. Tweets that embed an external link: [data-testid="tweet"]:has(a[href*="https://t.co/"])

In addition to all , Browserflow supports a few non-standard psuedo-selectors:

- Allows selecting an element by its text contents (case-sensitive)

- Allows selecting an element by the elements it contains

normal CSS selectors
:contains
:has
recording a flow