mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-12-21 01:29:04 +00:00
docs(puppeteer): final cheatsheet
This commit is contained in:
parent
919c839e24
commit
296c01b279
@ -439,39 +439,39 @@ response.url() // Contains the URL of the response.
|
|||||||
// SecurityDetails class represents the security details when response was received over the secure connection.
|
// SecurityDetails class represents the security details when response was received over the secure connection.
|
||||||
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-securitydetails
|
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-securitydetails
|
||||||
|
|
||||||
securityDetails.issuer() //
|
securityDetails.issuer() // Returns a string with the name of issuer of the certificate.
|
||||||
securityDetails.protocol() //
|
securityDetails.protocol() // Returns a string with the security protocol, eg. "TLS 1.2".
|
||||||
securityDetails.subjectName() //
|
securityDetails.subjectName() // Returns the name of the subject to which the certificate was issued to.
|
||||||
securityDetails.validFrom() //
|
securityDetails.validFrom() // Returns UnixTime stating the start of validity of the certificate.
|
||||||
securityDetails.validTo() //
|
securityDetails.validTo() // Returns UnixTime stating the end of validity of the certificate.
|
||||||
|
|
||||||
// TARGET
|
// TARGET
|
||||||
// -----
|
// -----
|
||||||
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-target
|
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-target
|
||||||
|
|
||||||
target.browser() //
|
target.browser() // Get the browser the target belongs to.
|
||||||
target.browserContext() //
|
target.browserContext() // Returns the browser context.
|
||||||
target.createCDPSession() //
|
target.createCDPSession() // Creates a Chrome Devtools Protocol session attached to the target.
|
||||||
target.opener() //
|
target.opener() // Get the target that opened this target. Top-level targets return null.
|
||||||
target.page() //
|
target.page() // Returns the page.
|
||||||
target.type() //
|
target.type() // Identifies what kind of target this is.
|
||||||
target.url() //
|
target.url() // Returns url.
|
||||||
target.worker() //
|
target.worker() // Returns worker.
|
||||||
|
|
||||||
// CDPSESSION
|
// CDPSESSION
|
||||||
// -----
|
// -----
|
||||||
// The CDPSession instances are used to talk raw Chrome Devtools Protocol
|
// The CDPSession instances are used to talk raw Chrome Devtools Protocol
|
||||||
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-cdpsession
|
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-cdpsession
|
||||||
|
|
||||||
cdpSession.detach() //
|
cdpSession.detach() // Detaches the cdpSession from the target. Once detached, the cdpSession object won't emit any events and can't be used to send messages.
|
||||||
cdpSession.send(method[, params]) //
|
cdpSession.send(method[, params]) // Send message.
|
||||||
|
|
||||||
// COVERAGE
|
// COVERAGE
|
||||||
// -----
|
// -----
|
||||||
// Coverage gathers information about parts of JavaScript and CSS that were used by the page.
|
// Coverage gathers information about parts of JavaScript and CSS that were used by the page.
|
||||||
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-coverage
|
// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-coverage
|
||||||
|
|
||||||
coverage.startCSSCoverage([options]) //
|
coverage.startCSSCoverage([options]) // Start CSS coverage.
|
||||||
coverage.startJSCoverage([options]) //
|
coverage.startJSCoverage([options]) // Start JS coverage.
|
||||||
coverage.stopCSSCoverage() //
|
coverage.stopCSSCoverage() // Stop CSS coverage.
|
||||||
coverage.stopJSCoverage() //
|
coverage.stopJSCoverage() // Stop JS coverage.
|
||||||
|
Loading…
Reference in New Issue
Block a user