diff --git a/daemon/daemon.go b/daemon/daemon.go index b959030..5d1f0f9 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -3503,7 +3503,16 @@ func (d *Daemon) interactMultiple(tabID, interactionsJSON string, timeout int) ( if jsErr == nil { // Trigger change event _, _ = element.Eval("this.dispatchEvent(new Event('change', { bubbles: true }))") - interactionResult.Success = true + + // Verify the JavaScript selection worked by checking the element's value + currentValue, err := element.Property("value") + if err != nil { + interactionResult.Error = fmt.Sprintf("failed to verify selection: %v", err) + } else if currentValue.Str() == interaction.Value { + interactionResult.Success = true + } else { + interactionResult.Error = fmt.Sprintf("failed to select option: %s (current value: %s)", interaction.Value, currentValue.Str()) + } } else { interactionResult.Error = fmt.Sprintf("failed to select option: %v", err) }