Adds a div to the dom with data provided by the user.
Optional
options: IAddToDomOptionsThis method fetches an element with selector, scrolls it into view if needed, and then uses page.mouse to click in the center of the element. If there's no element matching selector, the method throws an error.
Bear in mind that if click() triggers a navigation event and there's a separate page.waitForNavigation() promise to be resolved, you may end up with a race condition that yields unexpected results. The correct pattern for click and wait for navigation is the following:
const [response] = await Promise.all([
context.waitForNavigation(waitOptions),
context.click(selector, clickOptions),
]);
Optional
options: {}Optional
clickOptions: objectOptional
navigationOptions: IWaitOptionsExecutes a function in the website's browser context If the function passed to evaluate returns a Promise, then evaluate would wait for the promise to resolve and return its value.
Rest
...args: Json[]Carry out an extraction, and merge with the data that should be returned
Optional
mergeOptions: IMergeOptionsFunction that generates time based Two-Factor Authentication tokens. It uses the secret code as input, to generate those tokens. This code is usually available in form of a QR code * when enabling the two-factor auth on a given website. This can be used to bypass two factor auth on websites.
Load a URL
Optional
options: IGoToOptionsReport if the extractor got blocked on the target site. When the target site starts blocking connections, or throwing captchas, and there is no way to bypass it, extractor should report that it got blocked. That way the system will know that the proxy used in this connection should be taken out of rotation for the particular domain, and that this extractor should get a new proxy information on the next attempt.
Optional
details: stringTake a screenshot.
Use this sparingly, or consdier if you need it at all.
Optional
options: { Optional
fullOptional
type?: ScreenshotTypeScrolls page to bottom. Can be used for infinite scrolling pages.
Optional
options: IScrollOptionsSearches for a Network Request that was performed on the website, and allows gathering details of that request. Requires captureRequests to be called or used during goto
Specifies mixed proxy configuration
Function allowing solving Captchas found on the page. It takes an options argument that defines an element on the page that contains the Captcha, and the type of Captcha it is.
Optional
options: ITimeoutableRest
...args: Json[]Wait for a subtree modification
This will return a promise of a promise when the hook is in place to detect the page change
Optional
options: IWaitOptionsOptional
options: ITimeoutableOptional
options: ITimeoutable
You can have customized counters that collect with each task. You can have up to 100 counters for each task. Counters are not shared between tasks and task retries.