<div dir="ltr">I am trying to simulate a mouse select a dropdown selection, but the following code doesn't seem to work:<div><br></div><div><div> select_elm = browser.findFirst('select[id="myselect"]')</div>
<div> if not select_elm.isNull():</div><div> select_elm.evaluateJavaScript("this.selectedIndex=1")<br></div></div><div><br></div><div style>It neither changes the selected child element, nor does it trigger the changes on the page that a manual user select would have done.</div>
<div><br></div><div style>I'd like to simulate mouse select because it would also trigger other changes on the page, so just trying to set the option element inside does not do what I need.</div><div style><br></div><div style>
Anybody has experience with this?</div><div style><br></div><div style>Thanks</div><div style>Bao</div><div><br></div></div>