Skip to content

support for scoping selectors #42

@sharmarahul

Description

@sharmarahul

New to both webdriverio and chai-webdriverio.

I am using something like

var linkToArticleSelector = "a[href='link-to-article']"
expect(linkToArticleSelector).to.be.there();

While this works as expected, is there a way to deal with nested/scoped selectors?

Let's say the link was in the header on the page. I'd like to assert that the link was indeed within the header.

e.g

expect(header).to.have.selector(linkToArticleSelector)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions