I'm trying to automate an action in Internet Explorer.... I'm trying
to click an image that open a popup menu. The html code of the iimage
look like like <img blabla..OnClick="ShowMenu()"/>
I can click the image but my application is "sleeping" until I
manually click an item in the popup menu.
My code :
//--------------------------------//
using mshtml;
using SHDocVw;
...
SHDocVw.InternetExplorer ie = new SHDocVw.InternetExplorerClass();
SHDocVw.IWebBrowserApp ObjBrowser = (SHDocVw.IWebBrowserApp)ie;
ObjBrowser.Visible = true;
object noValue = System.Reflection.Missing.Value;
object noValue1 = System.Reflection.Missing.Value;
ie.Navigate("http://www.blabla.com", ref noValue, ref noValue, ref
noValue, ref noValue);
System.Threading.Thread.Sleep(1000);
WaitForReadyState(); not included in this example
HTMLImgClass Image =
(HTMLImgClass)ie.document.getElementById("MyImageI d");
Image.click(); // a PopupMenu is displayed after clicking the
object
MessageBox.Show("This message box is displayed only after manually
select an item in the popupmenu")
//--------------------------------//
Question 1 - Is there any way to have the messagebox displayed
immediatly after clicking the image...what is missing? look like my
click is waiting for something...
Question 2 - Is there any way to access to this popup menu ?what
kind of object it is??
Question 3 - Why this popup menu is not the in the HTML page? When
doing a view source i cant see anything about this popup menu, no
ShowMenu definition or javascript function/include...
Thanks for your help...