I would like my WebDriver script to execute some test after the webpage fires specific event. Is this possible?
In the WebDriver script there would be some kind of event listener:
document.addEventListener("hello", function(){
console.log("doing tests");
});
That would run when the webpage would executes:
var ev = new Event("hello");
document.dispatchEvent(ev);
Is this possible the other way around, so I could fire an event from WebDriver to the webpage?