StepArtifacts
conatus.utils.browser.artifacts
¶
Step artifacts for the browser.
To simplify: this module is here to save artifacts (HTML, screenshots, etc.) that could be potentially be saved during the browsing process.
In detail: this class is used in conjunction to the Step class. Each time a step is executed,
the artifacts are saved in the StepArtifacts object.
As a reminder:

XXXXX SAVING STUFF
XXXXX WHAT ABOUT THE DOM?
StepArtifacts
dataclass
¶
StepArtifacts(
step_n: int,
screenshot: Image,
screenshot_b64: str,
last_html: str,
new_download: Download | None,
config: BrowserConfig,
)
Artifacts related to a page.
| ATTRIBUTE | DESCRIPTION |
|---|---|
step_n |
The step number.
TYPE:
|
dom |
The DOM of the page.
TYPE:
|
screenshot |
Screenshot of the page (Pillow).
TYPE:
|
screenshot_b64 |
Base64 encoded screenshot of the page.
TYPE:
|
last_html |
The last HTML of the page.
TYPE:
|
new_download |
A new download, if any.
TYPE:
|
config |
The browser configuration.
TYPE:
|
save
¶
Save the artifacts.