# Robot keyword usage

**URL:** https://forum.robotframework.org/t/robot-keyword-usage/5301
**Category:** Robot Framework
**Created:** [11 February 2023 14:01 UTC](https://forum.robotframework.org/t/robot-keyword-usage/5301 "2023-02-11T14:01:23Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)
#### Post date: [13 February 2023 06:57 UTC](https://forum.robotframework.org/t/robot-keyword-usage/5301/4 "2023-02-13T06:57:25Z")

</div>

Hi Praveen,

Robot framework has generic keywords, but if you need to do a more complex task repetitively on different fields you can easily build a keyword for your task up from the basic keywords.

For example for your drop down with a disappearing element:

you could use

- [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) to open the drop down
- [Select From List By Index](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Index) / [Label](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Label) / [Value](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Select%20From%20List%20By%20Value) to select a value (drop down should auto close)
- [Click Element](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Click%20Element) to re-open the drop down
- [Element Should Not Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Not%20Be%20Visible) to confirm the element has disappeared

For example for your autosuggestions:

- [Input Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Input%20Text) into the field that gives the auto suggestions
- [Element Should Be Visible](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Element%20Should%20Be%20Visible) to verify the suggestions you expected to get appear
- [Get Text](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Get%20Text) to get the values of the suggestions

There are many possible variations, you’ll need to read the documentation for the SeleniumLibrary keywords and see what they can do for you.

Also use dev tools to see what type of HTML elements the developer used to create the drop down and auto suggestions. as the standard Select/Option list doesn’t have a disappearing item functionality and likewise there is no standard auto suggestion element in HTML. There are many javascript libraries that create these functionalities but they all use different HTML elements to do it, so you’ll need to work out what has been done specific to your application.

Dave.

---

_[View the full topic](https://forum.robotframework.org/t/robot-keyword-usage/5301)._
