public void ShouldBeAbleToGetTheLocationOfAnElement()
{
driver.Url = javascriptPage;
if (!(driver is IJavaScriptExecutor))
{
return;
}
((IJavaScriptExecutor)driver).ExecuteScript("window.focus();");
IWebElement element = driver.FindElement(By.Id("keyUp"));
if (!(element is ILocatable))
{
return;
}
Point point = ((ILocatable)element).LocationOnScreenOnceScrolledIntoView;
Assert.Greater(point.X, 1);
Assert.Greater(point.Y, 1);
}