Rayrun
← Back to Discord Forum

Keyboard methods not working inside select menu on Mac?

boutchersj
boutchersj

Hey all,

I had a weird issue using the page.keyboard.press('ArrowDown') method on Mac for an Electron app, during the part of a test where I had a select menu open & was trying to use the keyboard to select one of the options. It didn't seem to register the keypress on Mac in this scenario, but on Windows it worked fine.

I ended up splicing in some RobotJS code (keyTap) to press the arrow keys & Enter key inside of the select menu, because that worked on both platforms.

Anyone else encounter this edge case?

Steps to repro:

  1. On a Mac, open a select menu in a desktop app (Electron)
  2. Try to use the page.keyboard.press() method to navigate between options in the select menu OR select an option

This thread is trying to answer question "Why are keyboard methods not working inside select menu on Mac?"

1 reply
boutchersj
boutchersj

Keyboard methods not working inside select menu on Mac?

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].