-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Bugfix] Allow lowercase strings in send_keys
#86
base: main
Are you sure you want to change the base?
Conversation
cf8f957
to
390f821
Compare
@maciesielka Hi, thank you for your contribution and sorry for late review. It seems this PR breaks some compatibility for Capybara driver. Could you check the CI failure and fix it?
|
No worries, thanks for taking a peek! I'll try and investigate the test failures soon. |
@YusukeIwaki Looks like the shift key needs special handling, check out changes in 733e025 which include a comment to a seemingly important note from the Playwright docs. (I'm not sure how to run CI on those changes on my own, so I'll check back once you kick them off) |
Summary
This PR provides functionality that allows callers to specify lowercase keys in
send_keys
, something not currently supported as they are always uppercased unless they are sent as an individual string.Background
I'd like to write a test to validate behavior for opening a window with
send_keys [:control, 'k']
, but that's not possible because the keys are implicitly uppercased in this library. Note that this same command works using a Selenium driver.A possible workaround for existing versions is below, but ought to be supported outright.
I've added a test to this PR that confirms the correct behavior on sites that include shortcuts with modifiers (Tailwind) and without (Github).