I think you need to call pressShortcut on the Text control instead of a key, as you want to press a key while the text control has the focus. At least this is how I understand it.
Well, two questions on that, do you have the correct text reference? As it seems you like to get a Text control for a label, but you are using the method for searching a Text control for the specified text. Otherwise you should use textWithLabel() or something that fits your needs.
If you have the correct reference, than maybe you need to first set the focus to the control.
Mickael Istria Messages: 612 Registered: July 2009 Location: Grenoble, France
Senior Member
On 01/30/2013 08:04 PM, manali pattem wrote:
> Hey Dirk,
> Yeah i tried that too.But it doesnt work.DO we need to add anything
> else for this to work??
>
> SWTBotText botText = bot.text("High-level qualifier:");
> botText.pressShortcut(SWT.CR,SWT.LF);