Extends

  • Page

Properties

extractArrayOptimized()

extractArrayOptimized: (options) => Promise<Record<string, string>[]>;
an alias for extractArrayFromPage function

Parameters

options options.itemEntityName: string options.itemEntitySchema: SimpleArrayItemSchema options.label: string options.optionalPropertiesInvalidator? options.prompt?: string options.strategy?: ImageStrategy | HtmlStrategy options.variantKey?: string

Returns

Promise<Record<string, string>[]>

extractArrayUsingSelectors()

extractArrayUsingSelectors: <T>(extractor) => Promise<ExtractListObjectsUsingStaticSelectorsReturnType<T>>;
an alias for extractArrayFromPageUsingSelectors function

Type parameters

T extends ListStaticExtractor

Parameters

extractor: T

Returns

Promise<ExtractListObjectsUsingStaticSelectorsReturnType<T>>

extractMarkdown()

extractMarkdown: () => Promise<string>;
an alias for extractMarkdownFromPage function

Returns

Promise<string>

extractObjectOptimized()

extractObjectOptimized: (options) => Promise<null | Record<string, null | string>>;
an alias for extractObjectFromPage function

Parameters

options options.entityName: string options.entitySchema: SimpleObjectSchema options.label: string options.optionalPropertiesInvalidator? options.prompt?: string options.strategy?: ImageStrategy | HtmlStrategy options.variantKey?: string

Returns

Promise<null | Record<string, null | string>>

extractObjectUsingSelectors()

extractObjectUsingSelectors: <T>(extractor) => Promise<ExtractObjectFromPageUsingSelectorsReturnType<T>>;
an alias for extractObjectFromPageUsingSelectors function

Type parameters

T extends ObjectExtractor

Parameters

extractor: T

Returns

Promise<ExtractObjectFromPageUsingSelectorsReturnType<T>>

extractStructuredData()

extractStructuredData: (options) => Promise<any>;
an alias for extractStructuredDataFromPage function

Parameters

options options.dataSchema: JsonSchema options.label: string options.prompt?: string options.strategy?: ImageStrategy | HtmlStrategy

Returns

Promise<any>

fillForm()

fillForm: (options) => Promise<boolean>;
an alias for fillForm function

Parameters

options options.autoRecoveryOptions? options.autoRecoveryOptions.enabled: boolean Whether auto-recovery is enabled options.autoRecoveryOptions.fieldsToMask?: ElementSelector[] Fields to mask during auto-recovery, use this if you do not want to send your form values to ai. options.autoRecoveryOptions.generateDataToUnblockForm? options.autoRecoveryOptions.generateDataToUnblockForm.enabled: boolean Whether generating data to unblock the form is enabled. options.autoRecoveryOptions.generateDataToUnblockForm.prompt: string The prompt to use for generating data. options.autoRecoveryOptions.maxRetries?: number Maximum number of retries for auto-recovery options.autoRecoveryOptions.recoveryData: object Data to use for auto-recovery options.fillFieldTimeout?: number options.formInput: (DynamicFormInputItem | StaticFormInputItem)[] options.formLocator: Locator | ElementSelector options.isSubmitSuccessful options.submitForm options.timeout?: number options.waitTimeBetweenFill?: number

Returns

Promise<boolean>

goto()

goto: (url, options?) => Promise<null | Response>;
an alias for extractStructuredDataFromPage function

Parameters

url: string options? options.referer?: string options.throwOnTimeout?: boolean options.timeout?: number options.waitUntil?: "load" | "domcontentloaded" | "networkidle" | "commit"

Returns

Promise<null | Response>

Overrides

Page.goto