mirror of
https://github.com/browser-use/browser-use
synced 2026-04-22 17:45:09 +02:00
- 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.
22 lines
644 B
HTML
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>
|