`w3c: true` broke entering key combination (like [:control, ‘a’])
Table of Contents
???? Bug Report
Enabling w3c: true will not allow pressing key combination like [:control, 'a']
To Reproduce
require 'selenium-webdriver'
def browser_action(w3c_disabled)
caps = Selenium::WebDriver::Remote::Capabilities.chrome
caps['chromeOptions'] = { w3c: w3c_disabled }
service = Selenium::WebDriver::Chrome::Service.new(path: '/tmp/chromedriver_80.0.3987.16')
webdriver_options = { options: Selenium::WebDriver::Chrome::Options.new,
desired_capabilities: caps,
service: service }
driver = Selenium::WebDriver.for :chrome, webdriver_options
driver.navigate.to('https://github.com/login')
driver.action.send_keys([:control, 'a']).perform
value = driver.find_element(:xpath, '//*[@id="login_field"]').attribute('value')
driver.quit
value
end
puts "With w3c disabled: #{browser_action(false)}"
puts "With w3c enabled: #{browser_action(true)}"
Result
With w3c disabled:
With w3c enabled: a
This is simplified test example, but this problem actual for web apps which support hotkeys (for example selecting all files on web document manager)
Environment
OS: Kubuntu 18.04
Browser: Chrome
Browser version: 80.0.3987.116-1
Browser Driver version: 80.0.3987.16
Language Bindings version: Ruby 2.6.5p114
Read more here: Source link
