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

Introduce page.$eval and page.$$eval #625

Closed
aslushnikov opened this issue Aug 30, 2017 · 0 comments
Closed

Introduce page.$eval and page.$$eval #625

aslushnikov opened this issue Aug 30, 2017 · 0 comments
Assignees
Labels

Comments

@aslushnikov
Copy link
Contributor

@paulirish suggested to introduce page.$eval and page.$$eval that will reduce the need for a lot one-line methods.

E.g. elementHandle.attribute would be replaced with a one-liner:

let idAttribute = await page.$eval('div', div => div.id);

So the plan is:

  • introduce frame.$eval / frame.$$eval / page.$eval / page.$$eval
  • drop the elementHandle.attribute
@aslushnikov aslushnikov self-assigned this Aug 31, 2017
aslushnikov added a commit to aslushnikov/puppeteer that referenced this issue Aug 31, 2017
This patch:
- implements page.$eval and frame.$eval
- drops elementHandle.attribute() method in favor of the page.$eval

References puppeteer#625
aslushnikov added a commit that referenced this issue Aug 31, 2017
This patch:
- implements page.$eval and frame.$eval
- drops elementHandle.attribute() method in favor of the page.$eval

References #625
aslushnikov added a commit to aslushnikov/puppeteer that referenced this issue Oct 11, 2017
This patch adds a Page.$$eval method that runs document.querySelectorAll
and passes resulting array to the page function.

Fixes puppeteer#625.
aslushnikov added a commit that referenced this issue Oct 11, 2017
This patch adds a `Page.$$eval` method that runs `document.querySelectorAll`
and passes resulting array to the page function.

Fixes #625.
ithinkihaveacat pushed a commit to ithinkihaveacat/puppeteer that referenced this issue Oct 31, 2017
This patch adds a `Page.$$eval` method that runs `document.querySelectorAll`
and passes resulting array to the page function.

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

No branches or pull requests

1 participant