title: How to scroll up using Protractor.NET?
body: <p>My web page is little lengthy and the <strong>SAVE</strong> button is at the top right-hand corner. As I input the data through Protractor.NET, the webpage scrolls down which hides the <strong>SAVE</strong> button, thereby throwing a <strong>Element is not clickable at a point</strong> error. Now inorder to save the webpage, I need to scroll up and then find the <strong>SAVE</strong> button and click it.</p>
  
  <p>I have an example in Protractor which uses <code>window.scrollTo(0,0)</code>, but how do I implement the same in Protractor.NET</p>
  
  <p>EDIT: Included code</p>
  
  <pre><code>public void Test()
  {
       var saveBtn = NgWebDriver
                   .FindElement(By.ClassName("btnSave"))
                   .FindElement(By.ClassName("Save"));
      var btnSv = Scroller(saveBtn);
      btnSv.Click();
  }
  
  
  public IWebElement Scroller(IWebElement element)
  {
      ((IJavaScriptExecutor)NgWebDriver).ExecuteScript("arguments[0].scrollIntoView();", element);
      return element;
  }
  </code></pre>
  
  <p>So the exception occurs in Scroller method while casting the <code>NgWebDriver</code> to <code>IJavaScriptExecutor</code> type</p>
  
  <p>How can I accomplish this?</p>