NOTICE: Our Community is moving. Get more information. Updated information on a New Login Process
In some circumstances, using the Pick() method to choose cascade MenuItems when testing SWT applications can fail.
SWT/RCP menues behave differently compared to other controls in this technology. This is a known issue. Below are 2 workarounds that can deal with this problem:- 1. You can script single menu actions. For example the below action:- [ ] JavaEclipsePlatform.xWindow.OpenPerspective.Other.Pick() can be scripted using single menu actions like below:- [ ] JavaEclipsePlatform.xWindow.Pick() [ ] JavaEclipsePlatform.xWindow.OpenPerspective.Pick() [ ] JavaEclipsePlatform.xWindow.OpenPerspective.Other.Pick()
2. Alternatively you can set the following Open Agent option in your script -
[ ] Agent.SetOption(OPT_REPLAY_MODE, 1)