Skip to content

[Feature] WithAttribute function to chain elements on the same level with different attributes #10177

Closed

Description

Right now we need to repeat lines of code to get to the element with more than one attribute.

We would like to have an implementation that will help us with defining for example elements and then filter them by additional attribute:

[Example of what we want]:

image

[What we have?]
Right now we need to duplicate part of the standardProducts:

async chooseStandardProduct(dataProductName: string): Promise<void> {
   await this.page.locator(`[e2e-target-name="standard"][e2e-target-name="${dataProductName}"`]).click()
}

Thanks to that solution we can decrease code duplication. Similar solution already have testcafe.

Activity

  1. pavelfeldman commented on Oct 20, 2022

    @pavelfeldman
    Member

    Why was this issue closed?

    We are prioritizing the features based on the upvotes, recency and activity in the issue thread. It looks like this issue only has a handful of upvotes, has not been touched recently and/or we lack sufficient feedback to act on it. We are closing issues like this one to keep our bug database maintainable. Please feel free to open a new issue and link this one to it if you think this is a mistake.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions