minkphp / minkphp/Mink

Allow modifier for click-Method on NodeElement

Open
#359 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
PHP
Stars
1.6k
Forks
286
PR merge metrics
No merged PRs in 30d

Description

Hi,

the keyUp/Down/Press methods allow for a modifier, such as CTRL, SHIFT, ALT. These modifiers would make sense on the click-method as well. Think of multiple selection using shift or similar scenarios.
I know it's supported by sahi, so the MinkSahi driver could use it. In fact, we're currently using evaluateJavaScript('_click("element","SHIFT")') as a workaround.

Would you agree this would make sense?

Reference:
http://sahi.co.in/w/_click
http://mink.behat.org/api/source/behat/mink/element/nodeelement.php.html#line122

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the NodeElement source referenced in the issue and compare the existing keyUp, keyDown, and keyPress modifier handling with click. Then inspect the MinkSahi driver and its current evaluateJavaScript('_click("element","SHIFT")') workaround. Done means click supports a modifier consistently and the Sahi driver no longer needs that workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.