Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for string-based custom queries #5753

Merged
merged 26 commits into from Apr 30, 2020
Merged

Conversation

paullewis
Copy link
Contributor

@paullewis paullewis commented Apr 27, 2020

Relevant issues: #5747, #5405, #4171.

src/JSHandle.ts Outdated Show resolved Hide resolved
Copy link
Member

@mathiasbynens mathiasbynens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great so far! Left some thoughts, PTAL.

src/Puppeteer.js Outdated Show resolved Hide resolved
test/elementhandle.spec.js Outdated Show resolved Hide resolved
src/QueryFunction.ts Outdated Show resolved Hide resolved
src/JSHandle.ts Outdated Show resolved Hide resolved
src/JSHandle.ts Outdated Show resolved Hide resolved
test/elementhandle.spec.js Outdated Show resolved Hide resolved
@mathiasbynens mathiasbynens changed the title feature: Add support for string-based custom queries feat: add support for string-based custom queries Apr 27, 2020
src/QueryFunction.ts Outdated Show resolved Hide resolved
@paullewis
Copy link
Contributor Author

I think that's all the feedback addressed. PTAL.

(@mathiasbynens I will namespace this under experimental as discussed when everything else is okay)

src/QueryHandler.ts Outdated Show resolved Hide resolved
src/JSHandle.ts Outdated Show resolved Hide resolved
src/Puppeteer.js Outdated Show resolved Hide resolved
src/QueryHandler.ts Outdated Show resolved Hide resolved
src/JSHandle.ts Outdated Show resolved Hide resolved
src/JSHandle.ts Outdated Show resolved Hide resolved
@paullewis
Copy link
Contributor Author

paullewis commented Apr 29, 2020

Okay, these are the call sites. I'll go through and confirm that each one lands in the correct place to have custom query support.

  • page.$(selector)
  • page.$$(selector)
  • page.$$eval(selector, pageFunction[, ...args])
  • page.$eval(selector, pageFunction[, ...args])
  • page.click(selector[, options])
  • page.focus(selector)
  • page.hover(selector)
  • page.select(selector, ...values)
  • page.tap(selector)
  • page.type(selector, text[, options])
  • page.waitFor(selectorOrFunctionOrTimeout[, options[, ...args]])
  • page.waitForSelector(selector[, options])
  • frame.$(selector)
  • frame.$$(selector)
  • frame.$$eval(selector, pageFunction[, ...args])
  • frame.$eval(selector, pageFunction[, ...args])
  • frame.click(selector[, options])
  • frame.focus(selector)
  • frame.hover(selector)
  • frame.select(selector, ...values)
  • frame.tap(selector)
  • frame.type(selector, text[, options])
  • frame.waitFor(selectorOrFunctionOrTimeout[, options[, ...args]])
  • frame.waitForSelector(selector[, options])
  • elementHandle.$(selector)
  • elementHandle.$$(selector)
  • elementHandle.$$eval(selector, pageFunction[, ...args])
  • elementHandle.$eval(selector, pageFunction[, ...args])

paullewis and others added 9 commits April 29, 2020 15:50
Co-Authored-By: Mathias Bynens <mathias@qiwi.be>
Co-Authored-By: Mathias Bynens <mathias@qiwi.be>
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
We are seeing some CI flakes due to network resets, or issues out of our control. Let's try to avoid some of those by using Mocha's built-in retries.
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@paullewis
Copy link
Contributor Author

paullewis commented Apr 30, 2020

Changed CLA to yes because all commits were by people who have signed the CLA.

mathiasbynens and others added 2 commits April 30, 2020 12:06
This way it's super clear which product and binary you're testing against.
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@paullewis
Copy link
Contributor Author

paullewis commented Apr 30, 2020

Changed CLA to yes (again) because all commits were by people who have signed the CLA.

@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants