Skip to main content

Select

Selects a value from a select box (dropdown list) in the web page.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If ContinueOnError property is true, no error is caught when the project is executed even if the Catch node is used.

Input

  • Page Id - Id of the web page to select the element from. This ID is generated by the Open Browser node.
  • Selector Type - Type of the selector used to locate the element.
  • Selector - The XPath or CSS selector for the desired select box.
  • Value - The text value to select from the dropdown. (e.g. If the dropdown menu lists capital cities of the world, the value should be the name of a city.)

Options

  • Wait Timeout (sec) - The maximum amount of time (in seconds) to wait for the element to be selected. The default value is 5 seconds.

How It Works

  1. The node receives the Page ID, Selector Type, Selector, and Value
  2. It validates that the Page ID, Selector, and Value are not empty
  3. It waits for any configured delay before execution
  4. It retrieves the active page session using the provided Page ID
  5. The node waits for the select element to appear on the page (up to the Wait Timeout duration)
  6. Once the select element is located, it selects the option matching the provided value text
  7. The selection triggers any associated change events on the select element
  8. The node applies any configured delay after execution

Requirements

  • An active browser session created by the Open Browser node
  • A valid Page ID from the Open Browser node
  • A valid CSS or XPath selector that uniquely identifies the select element
  • The select element must be a standard HTML select/dropdown element
  • The value provided must match an option's visible text exactly
  • The select element must appear within the specified Wait Timeout period

Error Handling

Error CodeDescription
Core.Browser.Select.ErrOnCreateConfiguration parsing error during node creation
Core.Browser.Select.ErrOnMessageError parsing incoming message data
Core.Browser.Select.ErrPageIdPage ID is empty or not provided
Core.Browser.Select.ErrSessionInvalid or expired Page ID, session not found
Core.Browser.Select.ErrValueValue to select is empty or not provided
Core.Browser.Select.ErrSelectorSelector is empty or not provided
Core.Browser.Select.InvalidFieldInvalid value for Wait Timeout field
Core.Browser.Select.WaitElementSelect element not found within the specified timeout period
Core.Browser.Select.ErrSelectFailed to select the value (value not found in options)

Usage Examples

Example 1: Selecting Country from Dropdown

When filling out a form with a country selection:

1. Use Open Browser and navigate to the form page
2. Use Select with:
- Selector Type: CSS
- Selector: select[name="country"]
- Value: United States
- Wait Timeout: 10 seconds
3. The "United States" option is selected in the dropdown
4. Continue filling other form fields

Example 2: Dynamic Dropdown Selection

When selecting from a dropdown that loads options via AJAX:

1. Navigate to the page with dynamic dropdown
2. Wait for the dropdown to load options (use Wait Element)
3. Use Select with:
- Selector Type: XPath
- Selector: //select[@id='product-category']
- Value: Electronics
- Wait Timeout: 15 seconds
4. The selection triggers page updates
5. Continue with dependent selections or form submission

Example 3: Cascading Dropdown Selection

When working with cascading dropdowns where one selection affects another:

1. Use Select to choose a value in the first dropdown
2. Add a delay to allow the second dropdown to populate
3. Use Select on the second dropdown with the dependent value
4. Repeat for additional cascading selections
5. Submit the form with all selections made

Usage Notes

  • The Value parameter must exactly match the visible text of the option
  • Value matching is case-sensitive in most browsers
  • Select only works with standard HTML select elements
  • Custom JavaScript-based dropdowns may not work with this node
  • The node triggers change events automatically
  • Multiple selection (multi-select) is supported by calling Select multiple times
  • Some dropdowns may have hidden default options (like "Please select...")
  • Ensure the option exists in the select element before selection

Tips

  • Use browser developer tools to verify the exact option text
  • For dynamically loaded dropdowns, increase Wait Timeout appropriately
  • Add a small Delay After if subsequent elements depend on the selection
  • Test with different values to ensure all options can be selected
  • For custom dropdowns, consider using Click Element instead
  • Use Get Value after selection to verify the correct option was chosen
  • If selection fails, check for typos in the value text
  • Consider using XPath with option text for more flexible selection
  • For multi-select elements, call Select node multiple times with different values