# Unable to select an option from dropdown list i tried with select by index, label and sending hot key....

**URL:** <https://forum.katalon.com/t/unable-to-select-an-option-from-dropdown-list-i-tried-with-select-by-index-label-and-sending-hot-key/82183>\
**Category:** Web Testing\
**Tags:** dropdown, web-testing\
**Created:** [January 9, 2023, 3:12pm UTC](https://forum.katalon.com/t/unable-to-select-an-option-from-dropdown-list-i-tried-with-select-by-index-label-and-sending-hot-key/82183 "2023-01-09T15:12:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DU3017](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/du3017/32/20464_2.png) [@DU3017](https://forum.katalon.com/u/DU3017)\
**Post date:** [January 9, 2023, 3:12pm UTC](https://forum.katalon.com/t/unable-to-select-an-option-from-dropdown-list-i-tried-with-select-by-index-label-and-sending-hot-key/82183/1 "2023-01-09T15:12:02Z")

</div>

I want to choose an option from a drop-down menu, but the problem is that when I do so, I can only see the list of available options and not the item index or index value. I tried random selection, but that didn’t work for me. i tried with the send hot key also… i tried to see the development code; once I clicked their option, it disappeared. i have attached all relevant images below, so if you could please assist, thank you in advance..

 ![image1](https://europe1.discourse-cdn.com/katalon/original/3X/8/8/88218f2a29f7595909bc802a014fb71e0bc71f9c.png)  
 ![image2](https://europe1.discourse-cdn.com/katalon/original/3X/5/e/5eb7d90dadf5b5431038cbd19160ff8546923701.png)  
 ![image3](https://europe1.discourse-cdn.com/katalon/original/3X/a/8/a87a6ea9b0069d561bb0c1105590a5c3ffe56798.png)

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [January 9, 2023, 3:56pm UTC](https://forum.katalon.com/t/unable-to-select-an-option-from-dropdown-list-i-tried-with-select-by-index-label-and-sending-hot-key/82183/2 "2023-01-09T15:56:58Z")

</div>

You can only use “selectOptionByLabel”, “selectOptionByValue” or “selectOptionByIndex” on a **select** tag. In your case, you have a **div**.

However, you can get the dropdown items into a list and then do your thing with the list.

Click on the arrow of the dropdown and have the list display and then **right** click on the list and choose “Inspect”. This should display the HTML of the list. There may be a **class** that is similar to each item in the dropdown.

```auto
def driver = DriverFactory.getWebDriver();
List<WebElement> list = driver.findElements(By.xpath('//div[@class="...

```

---

<div class="post-metadata">

**Author:** ![DU3017](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/du3017/32/20464_2.png) [@DU3017](https://forum.katalon.com/u/DU3017)\
**Post date:** [January 11, 2023, 7:43am UTC](https://forum.katalon.com/t/unable-to-select-an-option-from-dropdown-list-i-tried-with-select-by-index-label-and-sending-hot-key/82183/3 "2023-01-11T07:43:19Z")

</div>

Thank you for your reply… but problem here is once if get the list item if i try click on the list item getting disappeared so unable to inspect the element also and one more thing if i try to expand the class its hidden so unable to see class name also…i will try once your suggestion also…
