title: How to convert a promise in protractor to a float
body: <p>I'm writing e2e tests using protractor and I'd like to check if some values on the page are correctly calculated. Something very simple like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>var var1 = element(by.binding('var1'));
  var var2 = element(by.binding('var2'));
  var var3 = element(by.binding('var3'));
  
  expect(parseFloat(var1.getText())).toEqual(parseFloat(var2.getText()) + 
         parseFloat(var2.getText()));
  </code></pre>
  
  <p>However, because var1, var2 and var3 are all promises, this does not work.</p>
  
  <p>Is there a way of converting the promise object to strings so that I can make the above work?</p>