bump
This commit is contained in:
parent
bfbda8e6a3
commit
63068cd79e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue