pestphp / pestphp/pest

[Feature Request]: Pass parameters to InteractsWithElements::click

Open
#1,477 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
11.7k
Forks
538
Avg merge
4d 11h
Merged PRs (30d)
8

Description

In InteractsWithElements trait, the code for click() is:

public function click(string $text): Webpage
{
    $this->guessLocator($text)->click();

    return $this;
}

However the underlining Locator has optional parameters: public function click(?array $options = null): void which, as far as I see, they are never used.

I think it'd be quite useful to have them as an optional parameter in InteractsWithElements.

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 in the InteractsWithElements trait at click() and compare its current call with the Locator click(?array $options = null) signature. Check the surrounding tests or usage for this trait, then verify that optional click parameters are supported without changing existing calls and that the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.