Skip to content

Shortcut findElements() mechanism for data attributes #39

Description

@scottconnerly

What are you trying to achieve? (Expected behavior)

A shortcut match() selector for data attributes.

What do you get instead? (Actual behavior)

Need to specify the whole css selector

How could the issue be reproduced? (Steps to reproduce)

Using the example in https://medium.com/swlh/5-tricks-to-elevate-your-automated-regression-tests-762f437c55e6

<a href="/footwear/boots/ankle-boots" data-qaid="shop-ankle-boots">Shop ankle boots</a>

it could be along the lines of:

$i->click(['data' => 'qaid|shop-ankle-boots'])

while today it is:

$i->click(['css' => '[data-qaid="shop-ankle-boots"]']);

Details

  • Codeception version: 3.1.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions