在常规WebBrowser
中,您可以使用以下代码单击某些内容:
webBrowser1.Document.GetElementById("welcome_box_sign_in_button").InvokeMember("Click");
但是在 WebKitBrowser 中,没有.InvokeMember
. 我该怎么做呢?
这是我要单击的按钮的代码:
<input tabindex="5" class="submit spriteall spritesite" id="welcome_box_sign_in_button" onclick="try{}catch(e){};if(!this.elem_welcome_box_sign_in_button){this.elem_welcome_box_sign_in_button=$('welcome_box_sign_in_button');this.spin_welcome_box_sign_in_button=$('welcome_box_sign_in_button_spinner');this.restore=function(t){return function(){t.elem_welcome_box_sign_in_button.show();t.spin_welcome_box_sign_in_button.hide();Event.stopObserving(window, 'unload', t.restore);}}(this);}this.elem_welcome_box_sign_in_button.hide();this.spin_welcome_box_sign_in_button.show();Event.observe(window, 'unload', this.restore);" type="submit" value="Sign In">