Closed bitplanets closed 9 years ago
Well this is the solution
var result = this.driver.executeScript('return "test"');
result.then(function(value){
console.log(value)
})
Because I think it uses async in order to communicate with the driver.
Almost everything the driver does is promise-based, and the promise object is what you're seeing when you console.log it. This is not something that pioneer can change as it's deferring to webdriver.
Also, you're looking at the wrong docs. You should be looking here: http://selenium.googlecode.com/git/docs/api/javascript/class_webdriver_WebDriver.html#executeScript
:+1: thats correct @tomhicks-bsf this is a proxy to webdriver
thanks for the help @tomhicks-bsf, appreciate it!
Thanks
I have this script that looks like this:
And the output of console.log is
Instead of
In the docs says that you receive a string for any other value. Why not?