How to choose value from an option list using PyQt4.QtWebKit
问题 I'm trying to auto-select a birthday from an option list on my website by using PyQt4.QtWebKit, but I'm having trouble doing this. When I want to select a radio button I do this: doc = webview.page().mainFrame().documentElement() g = doc.findFirst("input[id=gender]") g.setAttribute("checked", "true") Or set some text input: doc = webview.page().mainFrame().documentElement() s = doc.findFirst("input[id=say_something]") s.setAttribute("value", "Say Hello To My Little Friends") But how do I