Currently, I am utilizing Selenium in combination with WebdriverJS to automate a straightforward web application. However, an issue arises when transitioning from Chrome to PhantomJS, resulting in the test not functioning as intended. Specifically, the right mouse button fails to trigger the context menu. Has anyone encountered a similar problem before, and if so, what solutions were implemented? Below is a snippet of the code in question:
return driver.actions()
.mouseMove(driver.findElement(mapping.xpath.spaceSpace), {x:120, y:120})
.click(mapping.key.mouseRightButton)
.perform()
I have attempted various approaches such as removing coordinates, incorporating them within the click action, and experimenting with different mouse events - yet nothing has proven successful. It's worth noting that the same tests execute flawlessly in Chrome, Firefox, and IE.