title: Find matching elements in array using async/await and promise.all
body: <p>filterdList.length value always equal total number of elements with below code. So this method always returning false. There is only one item in the table that is matching with given name.</p>
  
  <pre><code>async itemExists(name) : Promise&lt;boolean&gt;{
  const itemList = await element.all(this.itemList)
  const filterdList= await Promise.all(itemList.filter( async (item) =&gt;{
    let text = await item.getText();
    if (text == name) {
      return true;
    }
  }));
  
   return await filterdList.length == 1;
  }
  </code></pre>
  
  <p>calling this method as below</p>
  
  <pre><code>console.log(await itemExists('unique item name'));
  </code></pre>