Set Dropdown
In this section, we will guide you on how to use the Set Dropdown
step.
Purpose
This step is used to set the selected item in a dropdown box (dropdown list), which is a common form of user interaction on web pages.
Some common use cases:
- Selecting different categories and columns on news content websites.
- Choosing different sizes, models, colors, etc., when placing orders on shopping websites.
- Selecting different options when filling out questionnaire forms.
Configuration
General
Step Name: Custom step name.
Element Location: Configure the location of the dropdown box element to be operated on, which is an XPath expression.
- Element is in IFrame/Frame: If the dropdown box element to be operated on belongs to an IFrame or Frame, you need to check this option and configure the XPath location expression for the IFrame itself (relative to its root node
<html>
,<iframe>
,<frame>
tags, etc.).
TIP
If the root node IFrame is also nested in other IFrames, you need to configure all IFrames in order until the outermost IFrame (whose root node is the
<html>
tag). Configure them in order from top to bottom, with the last one representing the outermost IFrame element.- Element is in IFrame/Frame: If the dropdown box element to be operated on belongs to an IFrame or Frame, you need to check this option and configure the XPath location expression for the IFrame itself (relative to its root node
Selection Method: Configure which method to use for setting the dropdown box options.
Select by Option Content: Set the selected item in the dropdown box through the
Option
below, you need to choose which option first.Select by Option Position: Set the selected item in the dropdown box through the
Option Position
below. If you want to select the first option in the dropdown list, the position would be 1. Entering a number beyond the list range will be invalid.
Advanced
Delay After Execution: The waiting time after performing the dropdown box setting operation.
Wait for Element to Appear: Before performing the dropdown box setting operation, wait for the dropdown box element to appear, configure the maximum waiting time.
TIP
The default waiting timeout is 20 seconds. If the dropdown box element takes a long time to load and appear on the webpage, you can adjust this setting to a longer waiting time. If the element appears earlier, the click operation will be executed immediately, and it won't wait until the timeout.