Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

clarified $ translation #272

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,13 @@ browser = await launch(headless=True)

### Element selector method name (`$` -> `querySelector`)

In python, `$` is not usable for method name.
So pyppeteer uses
`Page.querySelector()`/`Page.querySelectorAll()`/`Page.xpath()` instead of
`Page.$()`/`Page.$$()`/`Page.$x()`. Pyppeteer also has shorthands for these
methods, `Page.J()`, `Page.JJ()`, and `Page.Jx()`.
In python, `$` is not usable for method name. So pyppeteer changes the following with shorthands available:

| puppeteer | pyppeteer | pyppeteer shorthand |
|-----------|-------------------------|---------------------|
| Page.$() | Page.querySelector() | Page.J() |
| Page.$$() | Page.querySelectorAll() | Page.JJ() |
| Page.$x() | Page.xpath() | Page.Jx() |

### Arguments of `Page.evaluate()` and `Page.querySelectorEval()`

Expand Down