# How do i can click random item of dropdown list?

**URL:** <https://forum.katalon.com/t/how-do-i-can-click-random-item-of-dropdown-list/17950>\
**Category:** Miscellaneous\
**Tags:** start-page\
**Created:** [January 18, 2019, 5:27pm UTC](https://forum.katalon.com/t/how-do-i-can-click-random-item-of-dropdown-list/17950 "2019-01-18T17:27:01Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [October 19, 2021, 12:40am UTC](https://forum.katalon.com/t/how-do-i-can-click-random-item-of-dropdown-list/17950/6 "2021-10-19T00:40:40Z")

</div>

> [@shopaholiclet](#):
>
> file:/C:/Users/asabitsana/Katalon%20Studio/Fastrax%20Core/Scripts/scroll/Script1634187882419.groovy: 50: unable to resolve class WebElement  
> @ line 50, column 12.  
> WebElement randomElement = elements.get(new Random().nextInt(elements.size()))  
> ^

[You need to write an `import` statement](https://groovy-lang.org/structure.html#_imports) for `WebElement` class in the header part of your test case script. That is:

```auto
import org.openqa.selenium.WebElement;

```

The javadoc of this class is published here:

- [org.openqa.selenium.WebElement](https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/WebElement.html)

How can I find the fully qualified class name?

Either of the followings:

1. Try [searching pages for `WebElement`](https://duckduckgo.com/?q=WebElement&atb=v259-1&ia=web), or
2. Press Ctrl + Shiift + o, as @Brandon_Hein suggested. KS knows what WebElement is so that it will resolve the fully qualified class name for you.

---

_[View the full topic](https://forum.katalon.com/t/how-do-i-can-click-random-item-of-dropdown-list/17950)._
