title: Angular / Jquery selectors result an error when running Protractor
body: <p>I'm getting an error when running Karma + protractor on Angular Project.
  I tried few different methods for selecting elements, they all result in an error.</p>
  
  <p><strong>I'm seeking a way to make it work / to ignore this function when running the tests.</strong></p>
  
  <p>This is the line that fails the tests:</p>
  
  <pre><code>var chart = angular.element(document.querySelector("#chart2")).highcharts();
  </code></pre>
  
  <p>This line results in :</p>
  
  <blockquote>
    <p>TypeError: 'undefined' is not a function (evaluating
    'angular.element(document.querySelector("#chart2")).highcharts()')</p>
  </blockquote>
  
  <p>I tried several different methods:</p>
  
  <p>I change the line to:</p>
  
  <pre><code>var chart = $("#chart2").highcharts();
  </code></pre>
  
  <p>and got the follwing error:</p>
  
  <blockquote>
    <p>ReferenceError: Can't find variable: $</p>
  </blockquote>
  
  <p>I also tried to change this line to:</p>
  
  <pre><code>var chart = angular.element("#chart2").highcharts();
  </code></pre>
  
  <p>And then i got the follwing error:</p>
  
  <blockquote>
    <p>Error: [jqLite:nosel] Looking up elements via selectors is not
    supported by jqLite! See:
    <a href="http://docs.angularjs.org/api/angular.element" rel="nofollow">http://docs.angularjs.org/api/angular.element</a>
    <a href="http://errors.angularjs.org/1.2.4/jqLite/nosel" rel="nofollow">http://errors.angularjs.org/1.2.4/jqLite/nosel</a></p>
  </blockquote>
  
  <p>The important thing is all 3 options are working on angular.</p>
  
  <p><strong>I'm seeking a way to make it work / to ignore this function when running the tests.</strong></p>
  
  <p>Any idea that might work?</p>