With WatiN, it is possible to get to the "native" interface of elements in IE windows. Using that you can get the screen coordinates of any element.
using mshtml; //Add a reference to Microsoft.mshtml that comes with WatiN.
using WatiN.Core.Native.InternetExplorer;
public static System.Drawing.Point GetScreenPoint(IEElement element)
{
IHTMLElement nativeElement = element.AsHtmlElement;
IHTMLElement2 offsetElement = (IHTMLElement2)nativeElement;
IHTMLRect clientRect = offsetElement.getBoundingClientRect();
IHTMLDocument2 doc = (IHTMLDocument2)nativeElement.document;
IHTMLWindow3 window = (IHTMLWindow3)doc.parentWindow;
int windowLeft = window.screenLeft;
int windowTop = window.screenTop;
int elementLeft = clientRect.left;
int elementTop = clientRect.top;
int width = nativeElement.offsetWidth;
int height = nativeElement.offsetHeight;
int clickX = windowLeft + elementLeft + (width / 2);
int clickY = windowTop + elementTop + (height / 2);
return new System.Drawing.Point(clickX, clickY);
}
To use it:
Button myButton = browser.Button(Find.ById("myButton"));
System.Drawing.Point clickPoint = GetScreenPoint((IEElement)myButton.NativeElement);
MyClick(clickPoint);
Obviously the element has to be visible. I don't know how to check for that offhand, but I think you can change the scrollTop and scrollLeft attributes of the body to scroll around.
You'll also need a method to actually do the click, but there's probably an answer for that already on stackoverflow.