# How to select an option from the context menu, opened via mouse right-click?

**URL:** <https://forum.robotframework.org/t/how-to-select-an-option-from-the-context-menu-opened-via-mouse-right-click/8500>\
**Category:** SeleniumLibrary\
**Created:** [20 February 2025 19:57 UTC](https://forum.robotframework.org/t/how-to-select-an-option-from-the-context-menu-opened-via-mouse-right-click/8500 "2025-02-20T19:57:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rofan](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rofan](https://forum.robotframework.org/u/rofan)\
**Post date:** [20 February 2025 19:57 UTC](https://forum.robotframework.org/t/how-to-select-an-option-from-the-context-menu-opened-via-mouse-right-click/8500/1 "2025-02-20T19:57:31Z")

</div>

I am using Selenium.  
How to select any option of my choice from the context menu, opened via mouse right-click?  
E.g. the ‘Cast’ option?  
Sure, I can use Open Context Menu. But after that, I can’t do much else.  
Suggestions?

 ![Screenshot_19](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/a/aece480bf856de7b96e5f8bbc0bfdf1f2cf7187b.png)

---

<div class="post-metadata">

**Author:** ![RysZ](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/rysz/32/4570_2.png) [@RysZ](https://forum.robotframework.org/u/RysZ)\
**Post date:** [21 February 2025 14:56 UTC](https://forum.robotframework.org/t/how-to-select-an-option-from-the-context-menu-opened-via-mouse-right-click/8500/2 "2025-02-21T14:56:58Z")

</div>

Maybe try mix Se for Open Browser and then for chrome context menu automation use pyautogui

import pyautogui

pyautogui.click(x=100, y=200, button=‘right’)  
pyautogui.press([‘down’, ‘down’, ‘down’, ‘down’, ‘down’, ‘enter’])

for other options that have hotkeys assigned use pyautogui.hotkey(‘ctrl’, ‘S’)  
For casting itself there are some methods in webdriver class.

---

<div class="post-metadata">

**Author:** ![rofan](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rofan](https://forum.robotframework.org/u/rofan)\
**Post date:** [22 February 2025 09:04 UTC](https://forum.robotframework.org/t/how-to-select-an-option-from-the-context-menu-opened-via-mouse-right-click/8500/3 "2025-02-22T09:04:21Z")

</div>

Thank you for the response!  
Looks very promising!

I had been ignoring pure Python solutions until now, as I was hoping there was some easy, non-coder solution via Robot keywords/modules.

I guess coding is the way to go in this case 🙂

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [22 February 2025 12:00 UTC](https://forum.robotframework.org/t/how-to-select-an-option-from-the-context-menu-opened-via-mouse-right-click/8500/4 "2025-02-22T12:00:54Z")

</div>

Quite a few robot libraries utilize pyautogui under the hood.

---

<div class="post-metadata">

**Author:** ![RysZ](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/rysz/32/4570_2.png) [@RysZ](https://forum.robotframework.org/u/RysZ)\
**Post date:** [25 February 2025 11:39 UTC](https://forum.robotframework.org/t/how-to-select-an-option-from-the-context-menu-opened-via-mouse-right-click/8500/5 "2025-02-25T11:39:06Z")

</div>

Were you refering maybe to [GitHub - GDATASoftwareAG/robotframework-flaui: Windows user interface automation library for Robot-Framework. FlaUILibrary is a wrapper for the FlaUI automation library.](https://github.com/GDATASoftwareAG/robotframework-flaui), or you had other one in mind? Would be good to know for future projects.
