Comparing values of two promises <p>I wish to achieve the following:</p> <pre><code>var textPromise1 = element(by.id('id1')).getText(); var textPromise2 = element(by.id('id2')).getText(); if(textPromise1.SOMELOGIC == textPromise2.SOMELOGIC ) console.log('These are equal') </code></pre> <p>I know the promise is resolved using .then(). However, I want to know if there exists some way with which above can be achieved!</p> <p>Thanks,</p>