yosoi.browser
yosoi.browser
Typed flows and async access to the Rust browser Session and Action APIs.
Source: python/yosoi/browser.py:1
| Name | Summary |
|---|---|
AccessibilityExpectation |
Observe an accessible name and optional role during Until. |
AllExpectation |
Require every child expectation within one Until wait. |
Assert |
Declare an immediate DOM condition check. |
BoundFlow |
Retain an immutable Flow with a validated policy snapshot. |
BrowserCleanupError |
Retain cleanup failures alongside the original operation exception. |
BrowserExecutionIdentity |
Keep controller, engine claims and owned executable facts distinct. |
Check |
Name a synchronous local predicate for Contract assertions. |
Click |
Declare a single click on the current browser page. |
ConditionExpectation |
Observe a DOM condition as part of an Until wait. |
Configured |
Override continuation decisions for one action. |
CountAtLeast |
Declare a minimum number of matching DOM elements. |
Duration |
Represent a persisted Rust duration with explicit units. |
EnterText |
Declare text input on the current browser page. |
Evaluate |
Declare JavaScript evaluation in the browser page. |
EvaluateFile |
Retain a construction-time JavaScript file snapshot. |
EvaluateModule |
Retain a construction-time local JavaScript module graph. |
Exists |
Declare that at least one matching DOM element must exist. |
Flow |
Declare ordered browser steps without acquiring a Session. |
FlowExecutionError |
Raise strict completion failure while preserving the Flow outcome. |
FlowInvocationError |
Retain native invocation failure and any partial execution evidence. |
FlowOutcome |
Retain executed, skipped, and cleanup facts for a Flow invocation. |
FlowStopReason |
Explain where execution stopped and which continuation applied. |
JsonMatch |
Compare a response JSON value at an RFC 6901 pointer. |
LocalContractExpectation |
Retain an inspectable descriptor for local Contract checks. |
LocalRustAssertion |
Retain a local Contract assertion descriptor for inspection. |
Navigate |
Declare navigation to a URL on the leased browser tab. |
NestedFlow |
Execute a nested Flow within its enclosing invocation. |
Observation |
Retain browser evidence from a particular document epoch. |
OperationReceipt |
Retain observed, rejected, or unknown facts about an operation. |
ResponseExpectation |
Observe a matching network response during an Until wait. |
Screenshot |
Declare screenshot capture from the current browser tab. |
Session |
An acquired Rust Session, released by async context exit. |
SessionPolicy |
Configure Rust-owned limits and capabilities for a retained Session. |
SkippedStep |
Retain a declared step that was not started after a stop decision. |
StepOutcome |
Retain one executed step with failure and cancellation facts. |
Timed |
Apply a local execution deadline to one action. |
TriggerStep |
A one-shot action that can be followed by a bounded expectation wait. |
UntilCheck |
Retain the state and evidence of one expectation check. |
UntilReport |
Retain a typed Until result within the authoritative Flow outcome. |
UntilScope |
Fence an Until report to its Session, tab, and document. |
UntilStep |
Observe an expectation around an optional one-shot trigger. |
Visible |
Declare that a matching element must satisfy browser visibility checks. |
Wait |
Declare an explicit elapsed-time wait. |
WaitExpectation |
An expectation that can wait on the current page without a trigger. |
WaitUntil |
Declare a bounded wait for a DOM condition. |
Work |
An explicit browser control lease owned by one Session. |
Functions
Section titled “Functions”| Name | Summary |
|---|---|
action |
Navigate to url, then run the flow with managed SDK cleanup. |
all_of |
Combine expectations so every child must be satisfied. |
assert_all |
Check one typed Contract observation using synchronous local predicates. |
assert_that |
Declare an immediate check of a DOM condition. |
ax |
Declare an accessibility expectation for Until. |
check |
Author one named synchronous Contract predicate. |
click |
Declare one click without dispatching it. |
count_at_least |
Declare a minimum DOM match count for Until. |
enter_text |
Declare a text input action without executing it. |
evaluate |
Declare JavaScript evaluation without executing the source. |
evaluate_file |
Take a bounded, Rust-validated snapshot of one UTF-8 JavaScript file. |
exists |
Declare an element-existence expectation for Until. |
flow |
Build an immutable Flow, retaining Rust defaults unless configured. |
navigate |
Declare navigation without acquiring or changing a browser. |
response |
Declare a matching network-response expectation for Until. |
run_module |
Snapshot a bounded relative JavaScript module graph from disk. |
run_module_with_export |
Snapshot a JavaScript module graph and read one named export as JSON. |
screenshot |
Declare screenshot capture without executing it. |
session |
Create an async context manager for an explicitly owned browser Session. |
timed |
Apply a positive, explicit millisecond timeout to one action. |
until |
Declare an expectation wait around an optional one-shot trigger. |
visible |
Declare a browser visibility expectation for Until. |
wait |
Declare an explicit duration rather than a readiness condition. |
wait_until |
Declare a bounded DOM-condition wait. |
Aliases
Section titled “Aliases”| Name | Summary |
|---|---|
ActionKind |
Session policy action names used to allow or reject browser operations. |
BrowserError |
Native browser acquisition, execution, policy, or cleanup exception. |
BrowserMode |
Native browser display mode: headless or headful. |
Condition |
DOM condition tagged as existence, visibility, or minimum match count. |
ExecutionConcurrency |
Strict admitted execution capacity from one through 32 permits. |
FlowTermination |
Flow terminal states retaining issues, uncertainty, and cancellation. |
HttpStatus |
Strict integer HTTP status from 100 through 599; booleans are rejected. |
MaximumQueuedOperations |
Strict queue capacity from one through 1,024 waiting operations. |
OperationStatus |
Observed, rejected, or unknown operation state; unknown preserves uncertainty. |
PositiveMilliseconds |
Positive integer milliseconds whose microsecond conversion fits in u64. |
PositiveU32 |
Strict integer from 1 through 2**32 - 1 for positive browser values. |
PositiveU64 |
Strict integer from 1 through 2**64 - 1 for positive browser values. |
Step |
Tagged browser action, wrapper, nested Flow, or Until declaration. |
StopCause |
Explicit failure, cancellation, unknown-outcome, or unsafe-state stop cause. |
UntilCheckSource |
Evidence source used by a DOM, accessibility, or network expectation check. |
UntilCheckState |
Per-check pending, satisfied, rejected, or unavailable evaluation state. |
UntilExpectation |
Tagged DOM, Contract, accessibility, network, or combined Until expectation. |
UntilTermination |
Wait terminal states preserving unsuccessful and uncertain observations. |
Constants
Section titled “Constants”| Name | Summary |
|---|---|
MAX_UNTIL_REPORT_BYTES |
Maximum encoded Until report size in bytes, currently 1 MiB. |
U64 |
Strict integer from 0 through 2**64 - 1 for unsigned browser values. |