chai-webdriverio icon indicating copy to clipboard operation
chai-webdriverio copied to clipboard

support for scoping selectors

Open sharmarahul opened this issue 7 years ago • 0 comments

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)

sharmarahul avatar Jan 30 '18 11:01 sharmarahul