Skip to content

Commit 5e4733a

Browse files
Copilotkobenguyent
andcommitted
Fix TypeScript type definitions for new Puppeteer helper methods
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
1 parent 23ffd50 commit 5e4733a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/helper/Puppeteer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,9 +2731,9 @@ module.exports = Puppeteer
27312731
/**
27322732
* Find elements using Puppeteer's native element discovery methods
27332733
* Note: Unlike Playwright, Puppeteer's Locator API doesn't have .all() method for multiple elements
2734-
* @param {Page|Frame|ElementHandle} matcher - Puppeteer context to search within
2734+
* @param {Object} matcher - Puppeteer context to search within
27352735
* @param {Object|string} locator - Locator specification
2736-
* @returns {Promise<ElementHandle[]>} Array of ElementHandle objects
2736+
* @returns {Promise<Array>} Array of ElementHandle objects
27372737
*/
27382738
async function findElements(matcher, locator) {
27392739
if (locator.react) return findReactElements.call(this, locator)
@@ -2751,9 +2751,9 @@ async function findElements(matcher, locator) {
27512751
/**
27522752
* Find a single element using Puppeteer's native element discovery methods
27532753
* Note: Puppeteer Locator API doesn't have .first() method like Playwright
2754-
* @param {Page|Frame|ElementHandle} matcher - Puppeteer context to search within
2754+
* @param {Object} matcher - Puppeteer context to search within
27552755
* @param {Object|string} locator - Locator specification
2756-
* @returns {Promise<ElementHandle>} Single ElementHandle object
2756+
* @returns {Promise<Object>} Single ElementHandle object
27572757
*/
27582758
async function findElement(matcher, locator) {
27592759
if (locator.react) return findReactElements.call(this, locator)

0 commit comments

Comments
 (0)