codeceptjs / codeceptjs/CodeceptJS

Is it possible to work with element inside another element ?

Open
#2,780 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.2k
Forks
757
Avg merge
2d 9h
Merged PRs (30d)
16

Description

I am wondering if it is possible to work with elements inside of other elements.

For example :
```
const blocks = await Playwright._locate(blocksSelector);

for(let i = 0; i < blocks.length; i++) {
const element = blocks[i]

// How can i grab text for all h2 (or other selectors) inside element ?
// Something like
// let text = element.grabTextFrom('h2');
// console.log(text)
}
```

The documentations only gives us example for `element.click()`

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.