codeceptjs / codeceptjs/CodeceptJS

Is it possible to work with element inside another element ?

未关闭
#2,780 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
4.2k
派生
757
平均合并
2 天 9 小时
30 天内合并 PR
16

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。