[webkit-dev] Interact with DOM Elements using WebKit

Prema Arya prema.arya at gmail.com
Wed Apr 22 03:39:38 PDT 2009


Hi,
Following the C# code:

view = new WebViewClass();


          view.setHostWindow(this.panel1.Handle.ToInt32());

          WebKit.tagRECT rect;
          rect.bottom = rect.top = rect.left = rect.right = 0;
          view.initWithFrame(rect, null, null);
          WebKit.WebURLRequestClass req = new WebKit.WebURLRequestClass();
          req.initWithURL("http://login.live.com",
WebKit._WebURLRequestCachePolicy.WebURLRequestUseProtocolCachePolicy, 60);
          view.mainFrame().loadRequest(req);

          WebKit.IDOMHTMLInputElement element = (IDOMHTMLInputElement)
view.mainFrameDocument().getElementById("i0116");
          element.setValue(username);

          element = (IDOMHTMLInputElement)
view.mainFrameDocument().getElementById("i0118");
          element.setValue(password);

          element = (IDOMHTMLInputElement)
view.mainFrameDocument().getElementById("i0011");

          // This statement throws the error.
          element.click();

I am new to WebKit let me know if my approach is correct? My goal is to
browser website do some operations on it so that it would be helpful in
testing.

Thanks,
Prema Arya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090422/acb28320/attachment.html>


More information about the webkit-dev mailing list