thoughtbot / capybara-webkit

A Capybara driver for headless WebKit to test JavaScript web apps
https://thoughtbot.com/open-source
MIT License
1.97k stars 428 forks source link

[Bug fix] Support `:numpad8` for `send_keys` method #1068

Closed pocke closed 6 years ago

pocke commented 6 years ago

:numpad9 is duplicated instead of :numpad8, so send_keys method raises an error when it receives :numpad8. We can reproduce this behaviour with the added test case.

This pull request fixes the problem.

Note

I found this bug with RUBYOPT=-w. For example: (The second warning)

$ ruby -Ilib -rcapybara-webkit -e ''
/path/to/lib/ruby/gems/2.6.0/gems/addressable-2.5.2/lib/addressable/idna/pure.rb:154: warning: assigned but unused variable - startercc
/path/to/lib/capybara/webkit/node.rb:217: warning: duplicated when clause is ignored
mhoran commented 6 years ago

Thanks!