Skip to content

Commit

Permalink
Add special handling for the shift key
Browse files Browse the repository at this point in the history
  • Loading branch information
maciesielka committed Dec 11, 2024
1 parent 8160dbb commit 733e025
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/capybara/playwright/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,10 @@ def execute

class PressKey
def initialize(key:, modifiers:)
# Shift always requires uppercase key
# See https://playwright.dev/docs/input#keys-and-shortcuts
key.upcase! if modifiers.include?(MODIFIERS[:shift])

# puts "PressKey: key=#{key} modifiers: #{modifiers}"
if modifiers.empty?
@key = key
Expand Down

0 comments on commit 733e025

Please sign in to comment.