From 63068cd79e5414445da846e3914e43bf6e7a4c64 Mon Sep 17 00:00:00 2001 From: Josh at WLTechBlog Date: Tue, 19 Aug 2025 06:35:17 -0500 Subject: [PATCH] bump --- daemon/daemon.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index 5abbe9a..3195362 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -1966,15 +1966,16 @@ func (d *Daemon) selectElement(tabID, selector, value string, selectionTimeout, if err != nil { // If text selection failed, use JavaScript as fallback // This handles both option value and option text selection - script := fmt.Sprintf(`(function(){ + script := fmt.Sprintf(` var el = document.querySelector("%s"); if(el) { el.value = "%s"; el.dispatchEvent(new Event('change', { bubbles: true })); - return el.value; + el.value; + } else { + null; } - return null; - })()`, selector, value) + `, selector, value) // Execute JavaScript and get the result result, err := page.Eval(script)