I'm using protractor with Jasmine and I use page object pattern. In one of my page object I'm trying to hover the mouse over a pie chart. But when I use the following method it fails to get value for x coordinate using getDisHoverPoint(). When I put a logger for getDisHoverPoint(), it returns ManagedPromise::2516 {[[PromiseStatus]]: "pending"}. Please help.
this.hoverMouse = function() {
var dis = element(by
.css('#piecontainer .highcharts-series>path[fill="#434348"]'));
function getDisHoverPoint() {
return dis.getSize().then(function(text) {
return (text['height'] / 2).toFixed(0);
});
}
browser.actions().mouseMove(dis, {
x : getDisHoverPoint(),
y : 0
}).perform();
}