minkphp / Mink

PHP web browser emulator abstraction
https://mink.behat.org/
MIT License
1.6k stars 278 forks source link

Deprecate keyPress, keyDown, keyUp in favor of pressKey. #831

Open mparker17 opened 2 years ago

mparker17 commented 2 years ago

Problem / motivation

in #828, @stof said that "the [driver methods] that should actually be deprecated are the separate keydown, keypress and keyup methods in favor of a single pressKey method to match what is actually possible in browsers."

Proposed resolution

Notes

I modelled the DriverInterface::pressKey() method after php-webdriver/php-webdriver's \Facebook\WebDriver\Remote\RemoteKeyboard::sendKeys()

codecov[bot] commented 2 years ago

Codecov Report

Merging #831 (41ae224) into master (19e5890) will decrease coverage by 1.26%. The diff coverage is 68.18%.

@@             Coverage Diff              @@
##             master     #831      +/-   ##
============================================
- Coverage     98.47%   97.20%   -1.27%     
- Complexity      345      353       +8     
============================================
  Files            23       23              
  Lines           983     1002      +19     
============================================
+ Hits            968      974       +6     
- Misses           15       28      +13     
Impacted Files Coverage Δ
src/Driver/CoreDriver.php 92.30% <40.00%> (-7.70%) :arrow_down:
src/Element/NodeElement.php 95.87% <76.47%> (-4.13%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 19e5890...41ae224. Read the comment docs.