robotframework / SeleniumLibrary

Web testing library for Robot Framework
Apache License 2.0
1.39k stars 763 forks source link

Press Keys causes two key ups for selenium special keys #1748

Open MrBIN89 opened 3 years ago

MrBIN89 commented 3 years ago

Steps to reproduce the issue

Press Keys keyword execution with special selenium keys, for example Press Keys css:locator BACKSPACE, brings two _keyup events unexpectedly. That causes two letters removal instead of one in my case. изображение

Though in case the selenium key code is used there is no event duplicates, works like a charm изображение

Expected behavior and actual behavior

I was expecting that the Press Keys should work consistently for both scenarios, send key_down and key_up for once only:

  1. Press Keys css:locator BACKSPACE
  2. Press Keys css:locator \ue003

Environment

Browser: Chrome 90.0.4430.72 Browser driver: ChromeDriver 90.0.4430.24 Operating System: Windows 10 Libraries

MrBIN89 commented 2 years ago

PS: W3C chromedriver mode is set to False in the example above.