0

I read documentation about Promise javascript, and it seems not writeable or configurable. But I just want to get the value from it, for example, I have this code:

driver.wait(function(){
   return driver.getCurrentUrl().then(function(currentUrl) {
      return currentUrl.toLowerCase() == myStringUrl.toLowerCase();
   });
}, 50000);

So, currentUrl is a 'promise', and definitely currentUrl.toLowerCase() is wrong. But can I do something like this with a 'promise'?

Ragnarsson
  • 1,715
  • 7
  • 41
  • 74

0 Answers0