returning Prototype.Array shows in console.log but nothing from println.
davehorner opened this issue · comments
David Horner commented
let ret=client.execute("
console.log(parent.someOperation().map(x => x.Prop()));
return parent.someOperation().map(x => x.Prop());
",Vec::new()).await?;
println!("chrome: {}",ret.as_str().unwrap_or(""));
I see the data in the chrome debugger after I click the [{...}] icon. I only see empty "result:" lines from then fantoccini Json value returned.
Jon Gjengset commented
Hmm, this could be all sorts of things. I don't think is a bug in fantoccini. It might be a race condition in the code where the value is empty by time you get to the return
. It might be that the value is empty at the time of the return
, but by the time you look at the console it has resolve. Next thing to do would probably be to enable debug/verbose mode in your WebDriver to see what actually goes over the wire.