Skip to main content

Module frame

Module frame 

Source
Expand description

Re-export of frame helpers from runtime-foxdriver.

Preserves the captchaforge::frame import path.

Structs§

FrameTile
A single grid cell located inside the frame tree, with its bounding box expressed in main-viewport coordinates (the iframe offset is already summed in). index is the element’s 0-based position in the owning frame’s querySelectorAll(selector) result, in document order.

Constants§

DEFAULT_FRAME_RETRY_INTERVAL
Default poll cadence for the retry helpers. CAPTCHA iframes typically attach within 50–500ms of navigation; 100ms strikes a balance between responsiveness and CDP traffic.
DEFAULT_FRAME_RETRY_TIMEOUT
Default upper bound for the retry helpers. If a captcha widget hasn’t attached after 8s the page is almost certainly broken or behind a network stall (caller should fall back rather than wait longer).

Functions§

evaluate_in_all_frames
Evaluate expression in every frame of the page (main document + all iframes) and return the deserialized results from every frame that produced a valid value.
evaluate_in_frames_first
Evaluate expression in every frame and return the first result that passes filter. If no frame produces a matching result, default is returned.
find_element_centre_in_frames
Search every frame for a DOM element matching selector and return its bounding-box centre coordinates relative to the main viewport.
find_element_centre_in_frames_retry
Retrying variant of find_element_centre_in_frames.
find_iframe_rect_by_src
Find the bounding rect (left, top, width, height) of the first iframe whose src contains pattern.
find_tiles_in_frames
Locate all elements matching selector and return their bounding boxes in main-viewport coordinates, taking the matches from the FIRST frame that contains any.
harvest_token_in_frames
Like verify_token_in_frames but returns the populated token VALUE so the chain can hand a real cf-turnstile-response / g-recaptcha-response / h-captcha-response token back to the caller. The chain previously emitted hardcoded label strings ("behavioral:pre-pass", …) which downstream code treated as a success token but couldn’t actually validate against the vendor’s siteverify endpoint.
harvest_token_in_frames_retry
Retrying variant of harvest_token_in_frames.
verify_any_token_in_frames
Check whether a CAPTCHA response token exists in any frame. Used for post-solve verification when the provider may inject the token into a hidden input in the main document or inside an iframe.
verify_token_in_frames