Puppeteer already allows creating a new CDP session
via target.createCDPSession but there is no way
to get access to any existing session to send
some additional commands.
Until now, the click would be always sent to the middle
point of the target element. With this change, one can define
offsets relative to the border box of the elements and click
different areas of an element.
Up to now, only strings starting with '//' are considered as to XPath selectors. Unfortunately, this is too restricting. This fix allows valid XPath selectors starting with: '/', './', and even '(//*[1])'
The dom lib inserts all dom related types into the project, which is often
undesirable when working on a NodeJS project.
This change injects global stubs for the dom types required by puppeteer, so
puppeteer can work without users having to add dom types to their project.
Closes#6989
The values of these constant variables are always the exact same when the `parseAriaSelector()` function is called, so these can be moved out of the function.
* fix: added parts of website
* fix: removed unnecessary lines
* fix: updated contributing.md
* fix: added parts of sidebar
* fix: added all APIs
* fix: added version 10.0.0
Co-authored-by: Jack Franklin <jacktfranklin@chromium.org>
This patch adds a reject callback to the _processClosing promise and executes it if it catches an error on removeFolderAsync(...).
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
This change adds a new `channel` parameter to `puppeteer.launch`. When specified, Puppeteer will search for the locally installed release channel of Google Chrome and use it to launch. Available values are `chrome`, `chrome-beta`, `chrome-canary`, `chrome-dev`. This parameter is mutually exclusive with `executablePath`.
With this change,`request.respond`, `request.abort`, and `request.continue` can accept an optional `priority` to activate Cooperative Intercept Mode. In Cooperative Mode, all intercept handlers are guaranteed to run and all async handlers are awaited. The interception is resolved to the highest-priority resolution. See _Cooperative Intercept Mode and Legacy Intercept Mode_ in `docs/api.md` for details.
This patch removes the redundant `await` from the block while fetching the target. The value in the map is a `Target` instance, which itself is not an async resource.
This commit adds drag-and-drop support, leveraging new additions to the CDP Input domain (Input.setInterceptDrags, Input.dispatchDragEvent, and Input.dragIntercepted).
* fix: modified comment for method product, platform and newPage
* fix: added comment for browsercontext, StartCSSCoverage, StartJSCoverage
* fix: corrected comments for JSONValue, asElement, evaluateHandle
* fix: corrected comments for JSONValue, asElement, evaluateHandle
* fix: added comments for some of the method
* fix: added proper comments
* fix: added comment for some methods in page.ts
* fix: rectified the comments
* fix: changed some of the comments
* fix: added comments for 3 more methods of class page
* fix: added comments for 3 more methods of class page
Co-authored-by: Jack Franklin <jacktfranklin@chromium.org>