title: Not able to scroll to the element in a dropdown using protractor
body: <p>I am trying to select a checkbox from a dropdown in jq widgets. Now the code works when the element is in view but not otherwise. I understand that we need to scroll to element for protractor to be able to find it. I tried using executeScript and scrollIntoView here but am not able to scroll to the element. I tried a few other things as well. Please help me with this.</p>
  
  <pre><code>// conf.js
  exports.config = {
      directConnect: true,
      framework: 'jasmine',
      specs: ['jq.spec.js'],
  
      jasmineNodeOpts: {
          showColors: true,
          defaultTimeOutInterval: 30000000
      },
  }
  </code></pre>
  
  <p>My jq.spec.js:</p>
  
  <pre><code>describe('should check jq widgets', function() {
  
      it("should check the scrolling is proper",function() {
          browser.ignoreSynchronization = true;
          browser.get('http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdropdownlist/checkboxes.htm?arctic');
          browser.wait(protractor.ExpectedConditions.visibilityOf($('#dropdownlistContentjqxWidget')),500000,'dropdown did not display');
          $('#dropdownlistContentjqxWidget').click().then(function(){
              $('#listitem0innerListBoxjqxWidget&gt;div').click();
              scrollIntoView(element(by.xpath("//span[text()='Francisco Chang']/parent::div/div")));
              element(by.xpath("//span[text()='Francisco Chang']/parent::div/div")).click();
              browser.sleep(10000);
          });
      });
  });
  
  var scrollIntoView = function(element){
      browser.executeScript(function(element) {
          element.scrollIntoView();
          }, element.getWebElement());
      });
  
  };
  </code></pre>
  
  <p>//errors:</p>
  
  <pre><code>Failures:
  1) should check jq widgets should chech the scrolling is proper
    Message:
      Failed: No element found using locator: By(xpath, //span[text()='Francisco Chang']/parent::div/div)
  </code></pre>