I have following problem. I run test on Firefox and Chrome. On Firefox test run correctly but on Chrome SauceLabs give a message:
unknown error: Element is not
I. If the button is on the bottom of the page, the following code could be used to get you to the bottom via JavaScript from where the click can be executed:
(driver as IJavaScriptExecutor).ExecuteJavaScript("window.scrollTo(0,document.body.scrollHeight - 150)");
The same action could be done via C# with the Actions class provided by Selenium. This will get you to the bottom of the page----->
new Actions(Driver).SendKeys(Keys.End).Perform();
Keys.End could be switched with Keys.PageDown // Keys.Space
II. If you want to get to the exact position of the element you can:
1.Get the element's Y location---> var elementToClick = driver.findElement(By.{Anything}(""));
2.Execute the following JS---> (driver as IJavaScriptExecutor).ExecuteScript(string.Format("window.scrollTo(0,{0})", elementToClickYLocation.Location.Y));
3.Click the element---> elementToClick.click();