Files
browser-use/tests/ci/browser/iframe_template.html
Magnus Müller 4258546098 Add DOM serializer test templates and improve logging
- Introduced new HTML templates for DOM serializer tests, including a main page and an iframe template.
- Enhanced logging in the BrowserSession to provide clearer insights when fetching the CDP client for target nodes, improving traceability during debugging.
- Updated tests to utilize the new HTML templates, ensuring better structure and maintainability.

This update aims to enhance the robustness of the DOM serializer tests and improve error handling in session management.
2025-10-26 22:44:42 -07:00

22 lines
644 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Same-Origin Iframe</title>
</head>
<body style="padding: 10px; background: #fff;">
<h3>Same-Origin Iframe Content</h3>
<button id="iframe-btn">Iframe Button</button>
<input type="text" id="iframe-input" placeholder="Iframe input" />
<script>
// When button is clicked, increment counter in parent page using addEventListener
document.getElementById('iframe-btn').addEventListener('click', function() {
if (window.parent && window.parent !== window) {
// Call parent's incrementCounter function
window.parent.incrementCounter('Same-Origin Iframe');
}
});
</script>
</body>
</html>