To work with databases, you can use DB Table variables. These variables allow you to get access to database records and then use these records in your scripts and keyword tests.
|Note:||DB Table variables provide you with read-only and forward-only access to the database records. It means that you can iterate database rows only forward, starting from the first one.|
To start working with DB Table variables, you just need to add such a variable to your test first. For this purpose, you can use:
- Variables Page to create a new project suite or project variable of the DB Table type.
- Keyword Test Editor - Variables Page to create a new keyword test variable of the DB Table type.
After adding the variable to your test, you can use it in your scripts and keyword tests. For example, you can create a data-driven loop and iterate through all the records of the database to perform some actions using the retrieved data. To learn more about creating data-loops from your keyword tests, see the Data-Driven Testing With Keyword Tests tutorial.