I'm trying to FORWARD and email from GMAIL using the WebBrowserControl (C#).
-I am able to open the Gmail INBOX page on the WebBrowserControl...
-I am able to OPEN the specific email (among the others on the inbox) that I need to forward...
-I am able to find and click the FORWARD link to start working with the email fields (TEXTS)...
-I am able to add/insert the email that I would like to send TO...
-I am able to add/edit the content of the email body...
However, now that I am done with the email I CAN'T SEND IT. I need to invoke/click the SEND button but Gmail uses DIV instead of BUTTONS and the regular CLICK does not work.
This is what I did so far. Since most of the DIVs do not have ID, I iterate through all the DIVs inside the Gmail MAIN FRAME (canvas_frame)....
webIE.Document.Window.Frames["canvas_frame"].Document.Body.GetElementsByTagName( "div" );
...and with a regular expression I was able to find the right DIV that contains the text(SEND) that I need to click. Here is the sample on how GMAIL encapsulates the HTML 'SEND' BUTTON = DIV (the same apply to most of the buttons like SAVE NOW, DISCARD, etc).
<div id=":j5" class="J-K-I J-J5-Ji Bq L3" role="button" tabIndex="1" unselectable="on">
<div class="J-J5-Ji J-K-I-Kv-H" unselectable="on">
<div class="J-J5-Ji J-K-I-J6-H" unselectable="on">
<div class="J-K-I-KC" unselectable="on">
<div class="J-K-I-K9-KP" unselectable="on"> </div>
<div class="J-K-I-Jz" unselectable="on">Send</div>
</div>
</div>
</div>
</div>
I first tried invoking click ( InvokeMember("click") ) on the inner DIV containing the SEND text:
<div class="J-K-I-Jz" unselectable="on">Send</div>
...but unfortunately did not work, then I tried invoking click on all and any of the DIVs (Parent/Children) of the above HTML code with no luck at all.
Any IDEA/ADVICE on how can I get to SEND the email?
++Thanks