[PyQt] simulate mouse select in dropdown in QWebView
Jiangcheng Bao
jbao605 at gmail.com
Wed May 22 02:25:33 BST 2013
I am trying to simulate a mouse select a dropdown selection, but the
following code doesn't seem to work:
select_elm = browser.findFirst('select[id="myselect"]')
if not select_elm.isNull():
select_elm.evaluateJavaScript("this.selectedIndex=1")
It neither changes the selected child element, nor does it trigger the
changes on the page that a manual user select would have done.
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.
Anybody has experience with this?
Thanks
Bao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130521/3f771dd5/attachment.html>
More information about the PyQt
mailing list