File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
lib/capybara/selenium/nodes Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -79,11 +79,16 @@ def send_keys(*args)
7979 if contains_emoji
8080 inputs . join . grapheme_clusters . chunk { |gc | gc . match? ( /\p {Emoji Presentation}/ ) }
8181 . each do |emoji , clusters |
82- if emoji
83- driver . send ( :execute_cdp , 'Input.insertText' , text : clusters . join )
84- else
85- super ( clusters . join )
86- end
82+ # For non-headless we can send non-emoji normally and then send emoji via CDP
83+ # thereby getting key events and emoji. Unfortunately that doesn't work for
84+ # headless chrome currently so just send via cdp
85+ driver . send ( :execute_cdp , 'Input.insertText' , text : clusters . join )
86+
87+ # if emoji
88+ # driver.send(:execute_cdp, 'Input.insertText', text: clusters.join)
89+ # else
90+ # super(clusters.join)
91+ # end
8792 end
8893 else
8994 super ( *inputs )
You can’t perform that action at this time.
0 commit comments