Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support 'data-' attributes as locators for SeleniumLibrary #1474

@youtah

Description

@youtah

The data attribute is a well defined attribute in the HTML5 specification.

It would be nice to have a 'shortcut' in SeleniumLibrary, so we could use it as a locator.

For an Example:
If we had an element such as: <div data-automation="helptext">ABC 123</div>
Instead of using something like: css:div[data-automation="helptext"]
or instead of: //*[@data-automation="helptext"]

We could do something like this instead: data:automation:helptext

Submitted as per discussion in the seleniumlibrary channel in the RobotFramework Slack workspace.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions