我正在尝试模拟Web浏览器C#winforms中的div元素单击,但没有用
#region getting the voting button
//cYUyoUM3wmgRXEHv1LlZv
HtmlElementCollection buttonCollection = VotingBrowser.Document.GetElementsByTagName("button");
foreach(HtmlElement btn in buttonCollection)
{
//cYUyoUM3wmgRXEHv1LlZv
string btnClassName = btn.GetAttribute("className");
if(btnClassName == "cYUyoUM3wmgRXEHv1LlZv") {
MessageBox.Show(btn.InnerHtml);
btn.InvokeMember("click");
return;
}
}