Skip to main content

Overview

Tzafon executes actions immediately when you call them. Each method call sends a request to control the browser or desktop instance.

Immediate Execution

Each action executes immediately when you call it.

Usage

from tzafon import Computer

client = Computer()
with client.create(kind="browser") as computer:
    computer.navigate("https://example.com")  # Executes now
    computer.click(100, 200)                  # Executes now
    result = computer.screenshot()            # Executes now
    print(computer.get_screenshot_url(result))

Characteristics

FeatureDescription
ExecutionInstant when called
FeedbackAfter each action
Network CallsOne per action
Error HandlingCheck each result
DebuggingEasy step-by-step

Error Handling

Check each action result to handle errors:
result = computer.navigate(url)
if result.status == "ERROR":
    print(f"Failed: {result.error_message}")

Next Steps