Hi,
You would need to send a mouse down and a mouse up event. For example, the following code simulate a click at (x, y) location:
Code: C#
webView.SendMouseEvent(
MouseEventType.Down,
new Base.UI.MouseEventArgs(Base.UI.MouseButtons.Left, 1, x, y, 0));
webView.SendMouseEvent(
MouseEventType.Up,
new Base.UI.MouseEventArgs(Base.UI.MouseButtons.Left, 1, x, y, 0));
If you are looking for automating the web page, you may have another option to skip the simulating part completely. A typical browser cycle works this way:
1. The browser loads the page;
2. User enters some data (for example, entering user name and password);
3. User clicks a button to submit the page (for example, clicking "login" button);
4. The browser initiate a request to the server with the data user entered;
5. The server execute the request and send the response back to the browser (for example, login user in and display a welcome page);
What you can do is instead of simulating step 2 and step 3, you can go to step 4 directly using webView.LoadRequest. You would create a Request object and fills the Request objects with data that supposedly be entered by the user, then call WebView.LoadRequest to send the request to the web server directly and you will get the same result for step 5. This is much more reliable and more efficient.
Thanks!