Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move modifier Keys under a Modifiers subtype to call out that they behave differently #109

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

tristanlabelle
Copy link
Contributor

This was causing developer confusion and a bug report "In tests, sending Keys.control does not WM_KEYUP".

@tristanlabelle tristanlabelle merged commit 3a11024 into main Oct 20, 2023
1 check passed
@tristanlabelle tristanlabelle deleted the tristan/call-out-modifier-keys branch October 20, 2023 17:24
@jasdev
Copy link
Member

jasdev commented Oct 20, 2023

Hmm with this change I can’t simulate Alt being held while clicking since another key is needed in conjunction — i.e. having trouble updating this test after bumping the -webdriver SHA in the project. 🙏🏽

@tristanlabelle
Copy link
Contributor Author

@jasdev Since this change, you would have to explicitly add releaseModifiers: false to your sendKeys call.

@jasdev
Copy link
Member

jasdev commented Oct 23, 2023

@tristanlabelle: Right but afaict there’s no way to send .alt by itself without another key!

@tristanlabelle
Copy link
Contributor Author

tristanlabelle commented Oct 23, 2023

@jasdev Yes! sendKeys(Keys.Modifiers.alt, releaseModifiers: false)
(I wanted to add more friction for this API usage since it can be surprising, however we could add parameters to click() to combine with alt/ctrl/shift more easily)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants