MarketSquare / SwingLibrary

Swing UI testing library for Robot Framework
Other
113 stars 68 forks source link

mouseEvent.isPopupTrigger always evaluates to false on attempted popup menu access #105

Closed gregorymarco closed 6 years ago

gregorymarco commented 6 years ago

Running any code that attempts to access a popup menu hidden behind the os-dependent .isPopupTrigger results in the keyword receiving a pass, but failing to actually trigger the desired behavior.

This behavior was observed on Right Click On Component, Get Menu Items From Popup Menu, Select From Popup Menu, and I assume it bleeds into the tree node popup menu keywords as well.

More detail in my bewildered stackoverflow post

The only solution I could find was removing the offending safeguard. Is there a known workaround? I'd rather not ask the lead dev to remove perceived safety measures for testing.

gregorymarco commented 6 years ago

After doing a little more research, I think the issue is with the .isPopupTrigger function, instead of the SwingLibrary itself. I wouldn't bother trying to hunt it down. Instead, if anybody else runs into this, try using SwingUtilities.isRightMouseButton() as an alternative.