title: Unable to compare multiple array values with dynamic array in expect-Protractor
body: <p>Below is the scenario i am trying to automate:</p>
  
  <p>I am getting an expectation failure  when comparing static array with a dynamic array.</p>
  
  <p>Below is my code:</p>
  
  <pre><code>describe('My Test', function() {
      var names1="";
      var names2="";
      var names3="";
      it('Test starts', function() {
  
      browser.ignoreSynchronization = true;
      browser.get('https://www.w3schools.com/angular/');
  
      browser.sleep(5000).then(function(){ 
      });
          var results = element.all(by.css(".sidesection&gt;p&gt;a"));
          results.get(0).getText().then(function(text){
              console.log("Names are "+text);
              names1=text;
          })
          results.get(1).getText().then(function(text){
              console.log("Names are "+text);
           names2=text;
          })
          results.get(2).getText().then(function(text){
              console.log("Names are "+text);
           names3=text;
          })
  
      }); 
      it('Test starts2', function() {
      var array=[names1,names2,names3];
      console.log("URLS fetched are this:- "+names1); 
      console.log("URLS fetched are this:- "+names2); 
      console.log("URLS fetched are this:- "+names3);
      var results2 = element.all(by.css(".sidesection&gt;p&gt;a"));
      expect(results2.getText()).toContain(array);   
      });
  
  });
  </code></pre>