In our web application, we have an event called timelineEventClicked
that is created by a custom trigger.
canvas.addEventListener('click', function (evt) {
evt.stopImmediatePropagation();
var mousePos = getMousePos(canvas, evt);
...//some manipulation here
$.event.trigger({
type: "timelineEventClicked",
sender: _timelineObject,
events: settings.events,
eventData: eventData
});
});
I am looking to connect to the timelineEventClicked
event and retrieve the eventData
using selenium or protractor through injection.
IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;
executor.ExecuteScript(@"(function() {
document.addEventListener('timelineEventClicked', function(e) {
//Not sure what to do here to get back eventData
})();"
);
The issue I am facing is that the event timelineEventClicked
seems to be unrecognized, and I am unsure why this is happening.