Input Selenium Step
The Input Selenium Step writes text into a textbox on a website. Use this step to fill out forms or put data into web applications automatically.
What You'll Need
- An active Selenium driver session.
- A way to find web elements using selectors.
How to Use the Input Selenium Step
Add this step to your process to type text into a web element.
Step 1: Add the Input Selenium Step
- Drag and drop the Input Selenium Step into your process.
- Click on the step to open its settings.
Step 2: Set Up Input Parameters
Set these parameters to tell the step where to type and what text to use.
Parameters Explained
Step Name (Optional)
- A custom name for this step. This helps you find it in your process.
Selector Type (Required)
- How you will find the web element.
- Options: Class Name, CSS Selector, Name, Id, Link Text, Partial Link Text, Tag Name, XPath.
- Example:
Id - When to use it: Pick the type that best finds the textbox you want. XPath works well for complicated selections.
Selector Value (Required)
- The specific value for the
Selector Typeyou picked. - Example:
usernameField(ifSelector TypeisId) - When to use it: This tells the robot which exact element to use.
Clear Before Input (Required)
- This decides if the text already in the textbox gets deleted before new text is typed.
- Options:
T(true),F(false - default value) - When to use it: Set to
Tif you want to write over any text that's already there.
Text to Input (Required)
- The text you want to type into the textbox. This can be a variable or just a string of text.
- Example:
myUsernameVariableor"RobotiqUser" - When to use it: Give the data you need to put into the web form.
Wait for Element until timeout [ms] (Required)
- The longest time (in milliseconds) the robot will wait for the element to show up on the page.
- Example:
5000(waits for 5 seconds) - When to use it: Use this to avoid errors if the page loads slowly.
Driver Reference (Required)
- The variable that holds your active Selenium driver session.
- Example:
myWebDriver - When to use it: This connects the step to your open browser session. See Selenium driver for more information.
Element present (Required)
- A true/false variable that stores
Trueif the element was found, orFalseif it wasn't. - Example:
isElementFound - When to use it: Use this variable later in your process to make decisions or handle errors.
Error Handling
Throw exception (Required)
- This decides if the process stops with an error if the step doesn't work.
- Options:
T(true),F(false - default value) - When to use it: Set to
Tif this step failing means the whole process should stop. For more details, see Error Handling.
Related Articles
- Open Selenium Step - Learn how to open a web browser using Selenium.
- Key Press Selenium Step - Make the robot press keyboard keys on a website.
- Web Automation with Selenium - A general look at using Selenium for web automation.
Need Help?
Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.