I want to create function that get value from Promise.prototype.then(), but I don't exactly know how it's works.
I have such code:
ConfigurationPage.filteredItems.getText().then(function(value){console.log(value)});
and in console log I get some value - it's OK.
I try to create function that looks like this:
function getValue(data) {
return data.then(function(value){value})}
My expected result when I call such function:
getValue(ConfigurationPage.filteredItems.getText())
I get a value.
But I don't know how to create right function.
Thanks for support.