title: How to select an element in protractor having multiple classes?
body: <p>I have a div like this:</p>
  
  <pre><code>&lt;div class="class1 class2 class3" ng-click="displayItems(category.categoryId, category.categoryDescription, category.associatedToElements, 'isItemChecked')"&gt; &lt;/div&gt;
  </code></pre>
  
  <p>When I am trying to get the element in Protractor by css:</p>
  
  <pre><code>var elementList =  element.all(by.css('class2'));
  </code></pre>
  
  <p>I am getting undefined. </p>
  
  <p>When I am trying the same with ng-click:</p>
  
  <pre><code>var elementList = element.all(by.css('[ng-click="displayItems(category.categoryId, category.categoryDescription, category.associatedToElements, "isItemChecked")"]'))
  </code></pre>
  
  <p>still I am unable to track any element.</p>
  
  <p>Suggestions are most welcome.</p>
  
  <p>This is my code:</p>
  
  <pre><code>var categoryList, firstCategory;
  beforeEach(function(){
      categoryList = element.all(by.css('.class2'));
      firstCategory = categoryList.last();
  });
  
  it('Should display values correctly', function(){
      firstCategory.click();
  });
  </code></pre>