Real-Time Monitoring
Browser Swarm offers robust real-time monitoring capabilities, enabling you to observe and interact with your browser sessions as they happen. This feature is invaluable for debugging, human-in-the-loop interventions, and embedding live browser views into your applications.
🔍 Live View Overview
The Live View provides an interactive window into your active browser sessions, allowing you to:
Observe: Watch the browser's actions in real-time, including navigation, clicks, and form interactions.
Interact: Manually control the browser session by clicking, typing, or scrolling within the Live View.
Embed: Integrate the Live View into your own applications via an iframe for seamless user experiences.
This functionality is particularly useful when dealing with complex automation tasks that may require human oversight or intervention.
⚙️ Accessing Live View
To access the Live View for a session, use the getLiveViewUrl
method provided by the Browser Swarm SDK. This method returns a URL that can be opened in a browser or embedded in an iframe.
Example:
Once you have the Live View URL, you can open it in your browser to monitor the session or embed it into your application as needed.
🧩 Embedding Live View
To embed the Live View into your application, use an <iframe>
element with the obtained URL.
Read-Only View
Interactive View
Adjust the sandbox
attributes and styles according to your application's requirements.
📱 Mobile Viewports
To simulate mobile devices in the Live View, configure the session's viewport and user agent settings during creation.
Example
This setup ensures that the Live View accurately reflects the appearance and behavior of a mobile device.
🛠️ Use Cases
Debugging: Identify and resolve issues in real-time by observing session behavior.
Human-in-the-Loop: Allow human intervention during automation tasks for inputs like CAPTCHA solving or complex navigation.
User Support: Assist users by observing their interactions and providing guidance through embedded Live Views.
Demonstrations: Showcase automation workflows live within presentations or applications.
By leveraging the Real-Time Monitoring capabilities of Browser Swarm, you can enhance the reliability and interactivity of your browser automation tasks.
Last updated