1

I'm trying to pass the menu key or application key ( https://en.wikipedia.org/wiki/Menu_key ) in Selenium, and due to some policy restrictions, I am not able to use the right click action to open the the dropdown menu. (IE: action.ContextClick(element) does not work).

There is not an option I see for the menu button in Keys.___, nor was I able to find an alternative after searching. Does anyone know how to access this menu without actually right clicking?

Rescis
  • 547
  • 5
  • 19
Mrk
  • 557
  • 1
  • 10
  • 30
  • @JeffC my question is not about the Windows Key, but the key that sits in between Alt and Ctrl key at the right hand side of a keyboard ( you can click on the wikipedia link that I have provided ). I have searched for an answer in the many portals and also in SO, but I couldn't find it out, thats why I have reached out to the community. I am not able to use right click due to restrictions, but clicking on the menu key is bringing up the required window. – Mrk Jan 15 '18 at 17:10
  • You are right. I even looked at the article but it looked like the Windows key to me so I assumed it was the same. Keys like the Windows and menu keys are not really individual keys but key combinations. In the article you linked they show 2 or 3 key combinations. Have you tried those? Please explain in more detail why you can't use right-click. Also post the code you have tried and any error messages or why it didn't work. – JeffC Jan 15 '18 at 17:20

1 Answers1

2

I had this problem before, and the menu key functionality is not supported yet in selenium.

What you can do however is in the language of you shoice, the equivalent of driver.SendKeys(Keys.Shift + Keys.F10); (Shift + F10 is an equivalent to the menu key), and then follow the instructions here for navigating menus using actions and mouse position movements.

Rescis
  • 547
  • 5
  • 19