i-click fails with html entity present...

Open
#62 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
php
Domain
testing-qa

Research direction

Start by reproducing i->click('sign-in') with the button and HTML entity variations shown in the issue. Trace the WebDriver module's text matching for the click target; done means the acceptance click succeeds when an entity appears inline in the button content.

Written by the indexing model from the issue text.

Description

Seems like this is an aggressive regex type deal, but having an html entity inlined inside a button causes an acceptance test fail. Doesn't seem to matter what the entity is. It seems a blank space is needed to cause the entity to be ignored.

// $i->click('sign-in');

// this fails...
<button type="submit">
    <span class="fa fa-user"></span>&nbsp;sign-in
</button>

// this fails, variations...
    &nbsp;<span class="fa fa-user"></span>sign-in
    <span class="fa fa-user">&nbsp;</span>sign-in

//...and this doesn't...        
    <span class="fa fa-user"></span>sign-in
    <span class="fa fa-user"></span>&nbsp; sign-in
    &nbsp; <span class="fa fa-user"></span>sign-in

No biggie, but was a bit of a surprise trying to figure out why the test failed.

Dominant language
PHP
Stars
39
Forks
23
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from Codeception/module-webdriver

All issues in Codeception/module-webdriver

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.