public void useFirefox()
{
button2.PerformClick();
if ((string.IsNullOrEmpty(textBox1.Text) || (string.IsNullOrEmpty(rankDomain.Text))))
{
MessageBox.Show("SOme text, you have 60 seconds time.");
WaitNSeconds(60);
}
button1.Enabled = false;
btnStop.Enabled = true;
completedkeywordsHelp.Lines = textBox1.Lines;
for (iGesko = 0; iGesko < textBox1.Lines.Length; iGesko++)
{
if (btnStop.Enabled == false)
{
break;
}
if (!(textBox1.Lines[iGesko].Equals("")))
{
firefoxBrowser.Navigate("https://www.google.com/search?q=" + textBox1.Lines[iGesko] + "&num=" + resultsPerPage.Text);
}
else
{
webBrowser1.Navigate("about:blank");
webBrowser1.DocumentText = "No request performed, this is an empty keyword/space.";
}
-
private void firefoxBrowser_DocumentCompleted(object sender, EventArgs e)
{
MessageBox.Show("entered");
}
加载页面后,它应该触发文档完成的文档,但不会触发。我不确定为什么会这样。我可以看到网页正在加载,但未触发该事件。