# Problems selecting an entity of a drop-down menu

**URL:** <https://forum.robotframework.org/t/problems-selecting-an-entity-of-a-drop-down-menu/4501>\
**Category:** Robot Framework\
**Created:** [11 August 2022 09:17 UTC](https://forum.robotframework.org/t/problems-selecting-an-entity-of-a-drop-down-menu/4501 "2022-08-11T09:17:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ybr](https://avatars.discourse-cdn.com/v4/letter/y/df788c/32.png) [@Ybr](https://forum.robotframework.org/u/Ybr)\
**Post date:** [11 August 2022 09:17 UTC](https://forum.robotframework.org/t/problems-selecting-an-entity-of-a-drop-down-menu/4501/1 "2022-08-11T09:17:11Z")

</div>

Hello all,

I have a case, where I have to select one of the items of a drop-down menu. I tried many things, but so far I am not able to select the item.

So the test case looks like that:

\*\*\* Settings \*\*\*  
Library SeleniumLibrary

\*\*\* Test Cases \*\*\*  
TestCase1  
open browser [https://url.axess.shop/](https://url.axess.shop/) chrome  
maximize browser window  
input text xpath=//input[@id=‘CompanyLoginId’] x  
input text xpath=//input[@id=‘UsernameLogin’] y  
input text xpath=//input[@id=‘PasswordLogin’] z  
click element xpath=//button[@id=‘btn\_submit\_login’]  
Wait Until Element Is Visible xpath=//_[@id=“m\_aside\_left\_offcanvas\_toggle”] timeout=5s  
click element xpath=//_[@id=“m\_aside\_left\_offcanvas\_toggle”]  
Wait Until Element Is Visible xpath=//_[@id=“m\_ver\_menu”]/ul/li[2] timeout=5s  
TestCase2  
click element xpath=//_[@id=“m\_ver\_menu”]/ul/li[6]/a  
Wait Until Element Is Visible xpath=//_[@id=“searchRow”]/div/div[2]/span timeout=5s  
click element xpath=//_[@id=“searchRow”]/div/div[2]/span  
input text xpath=//_[@id=“searchRow”]/div/div[2]/span/span[1]/span/span/input Tageseintritt  
Press Keys xpath=//_[@id=“searchRow”]/div/div[2]/span/span[1]/span/span/input ENTER  
…

And the element to be found so:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/0/0e917fcb2c0233bdc132f2d036d29d3c5ca3d388.png)

So in the first test case it logs in and selects some context menu. In the second test case it clicks on a field, where a drop-down menu should appear. In this menu I have to select the first element (with the text “Tageseintritt” - it’s German for “a day ticket”). What I tried:

- Just find its selector - does not work, the drop-down menu disappears as soon as I do a right click on it. I tried to open the Inspect tool first, then click on the drop-down, but the solely thing I see, that when I am hovering on the drop-down menu and moving between its items, something has being changed in the parent element (the value of one of attributes)
- As you see in the test case, the Press Keys keyword - does not work. It writes an error, that this keyword does not exist and suggests the keyword Press Key instead
- Instead of the Press Keys keyword the following one: Select From List By Value xpath=//\*[@id=“searchRow”]/div/div[2]/span Tageseintritt - does not work, it does not find this list
- Instead of Press Keys keyword the following one: Click Element xpath=//a[contains(text(),‘Tageseintritt’)] - also finds no element with this label

Could I try something more?

Regards,  
Mischa

---

<div class="post-metadata">

**Author:** ![Timo](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@Timo](https://forum.robotframework.org/u/Timo)\
**Post date:** [27 August 2022 16:11 UTC](https://forum.robotframework.org/t/problems-selecting-an-entity-of-a-drop-down-menu/4501/2 "2022-08-27T16:11:54Z")

</div>

You can inspect the drop-down menu by setting the “Emulate a focused page” on at the Rendering menu of the browser’s developer tools.

Press Keys is new in SeleniumLibrary 3.3. Maybe you should update the library to newer version?

---

<div class="post-metadata">

**Author:** ![Srini](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Srini](https://forum.robotframework.org/u/Srini)\
**Post date:** [26 July 2023 12:44 UTC](https://forum.robotframework.org/t/problems-selecting-an-entity-of-a-drop-down-menu/4501/3 "2023-07-26T12:44:03Z")

</div>

I am also facing the same error, unable to fine it as dropdown list. I have used List, Index & Label too but getting error like locator not found. Please suggest some solution. Thank you.
