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 摘要。