It might be necessary specify the button as:
squish.MouseButton.RightButton
However it is not clear exact error message you are facing.
Therefore it might be better to share support information logs in the future.
For more information regarding obtaining the support information logs, please refer to the following knowledge based article.
Collecting the most important information (Linux, macOS, Windows)
@Pieter-Knelissen said in Squish for java, right-click to show context menu:
I have a row in a table and when I right-click on the row, a context menu should appear.
I can find the row in the table but have no clue how to bring up the context menu and select an item.
Some trial:
'obj' is the object representing the row
'common.Applications_Setup_ContextMenu' is the name of the menu as found during recording.
squish.nativeMouseClick( obj, button=RightButton )
squish.activateItem(squish.waitForObjectItem(common.Applications_Setup_ContextMenu, "Remove project"))
but it complains about 'RightButton'. I tried squish.RightButton, MouseButton.RightButton and various permutations of capitalization.....
I have 2 questions:
what is the right way to bring up the context menu?
where can I find definitions of constants like 'RightButton' ?