Got one very weird scenario on Internet explorer 11. I have written one C# automated program for Internet explorer which was working fine till IE 10, now suddenly from IE 11, document complete stopped to raise more them 8 out of 10 times.
Just take an example of below code.
it will show Message box for the first time then it will never show that.
using System;
using System.Windows.Forms;
using SHDocVw;
namespace IE11_POC
{
public partial class Form1 : Form
{
InternetExplorer IE;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
IE = new InternetExplorer();
IE.Visible = true;
IE.DocumentComplete += IE_DocumentComplete;
IE.Navigate("http://stackoverflow.com/");
}
void IE_DocumentComplete(object pDisp, ref object URL)
{
MessageBox.Show(URL.ToString());
}
}
}
Can any one please help me how to do this?