Form Filling with Selenium IDE
How to enter data into a website automatically
This tutorial explains how to do form filling with Selenium IDE commands. Form filling is about getting data into a website. This includes uploading documents and images, since the task here is to enter the file path into the file upload box (input type="file").
Example: Form filling with the Selenium IDE TYPE command.
When to use what command?
The table belows shows the best from filling commands. Click the recommended command for more information and example code.
|Area to fill...||Command to use||Comment|
|Enter text in input fields (input box, text area)||type||Type is one of the most often used commands.|
|Select an option in a drop down||select|
|Change the status of a checkbox or radiobutton||click||Toggles the status of a checkbox|
|Change the status of a checkbox or radiobutton||check, uncheck||Sets the status regardless of what it was before|
|Upload a file input type="file" (Chrome, Edge)||type||See Selenium IDE file upload|
|Upload a file input type="file" (Chrome, Edge, Firefox)||XType*||For more details see this selenium ide file upload forum post|
|Fill data in the clipboard for copy & paste||store | data | !clipboard*|
(*) These command are only available in the UI.Vision RPA Selenium IDE. They are not part of the classic Selenium IDE.
Form-filling data from a CSV file
Where does the data to fill in come from? It can be hardcoded in the macro, calculated in the macro or read from a CSV file. Reading data from a CSV file is the by far best option of you have larger datasets, for example a list of customers that you need to enter into a CRM system.
For reading data from a CSV file use csvRead.
Anything wrong or missing on this page? Suggestions?
...then please contact us.