Greetings! I am currently facing an issue in my Angular application with Openlayers3 map integration. There is a layer representing a building on the map, and when I try to click on a building during testing, it should trigger a side panel displaying images related to that specific building.
However, the problem arises specifically in Firefox where the test does not seem to function as expected. Has anyone else encountered a similar issue before? Is there a known solution to this problem?
I suspect that the issue might be related to the .mouseMove
aspect of my code:
// Within my page object, I have a method
this.clickOnBuilding = function(buildingId) {
return browser.executeScript("return angular.element(document.querySelector('#map')).scope().map.custom.getPixelForBuilding(" + buildingId + ")").then(function(pixel){
return browser.actions()
.mouseMove(element(by.id("map")).getWebElement(), {x: pixel[0], y: pixel[1]})
.click()
.perform();
});
};
And in my test script, I execute:
it('multiple images are linked to the building', function() {
mainPage.goTo('admin', 'admin');
var buildingDetailPage = mainPage.buildings().byIndex(0).openDetail();
browser.waitForAngular();
buildingDetailPage.clickOnBuilding(1);
var buildingPanel = buildingDetailPage.getBuildingPanel();
expect(buildingPanel.countImages()).toBe(3);
});
This functionality works flawlessly in Chrome and Internet Explorer, but encounters issues in Firefox. Any suggestions or insights would be greatly appreciated!
Selenium driver : 2.47.1
AngularJS : 1.3.4
karma : 0.12.16
karma-jasmine: 0.2.2
Thank you for your assistance!