Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How do I create a CR?
How do I create a CR? [message #545956] Fri, 09 July 2010 17:19 Go to next message
John Ormerod is currently offline John OrmerodFriend
Messages: 39
Registered: January 2010
Member
Hi
I've managed to open my Chat editor and entered 'Hello' into the lower Text field (had to change my system to be US keyboard, for now).

Now, I want to simulate pressing the CR button. It doesn't seem to be one of the vlaues in a .keyboard file, and I can't see a method that looks promising, other than pressShortcut(keys). But the Keystroke class seems to be for key coimbinations.

No doubt the answer will seem obvious after the event.

Regards, John
Re: How do I create a CR? [message #546066 is a reply to message #545956] Sat, 10 July 2010 16:29 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
See KeyStrokes#CR. You can also just #typeText("\r") instead.

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot

On 7/9/10 10:19 AM, John Ormerod wrote:
> Hi
> I've managed to open my Chat editor and entered 'Hello' into the lower
> Text field (had to change my system to be US keyboard, for now).
>
> Now, I want to simulate pressing the CR button. It doesn't seem to be
> one of the vlaues in a .keyboard file, and I can't see a method that
> looks promising, other than pressShortcut(keys). But the Keystroke class
> seems to be for key coimbinations.
>
> No doubt the answer will seem obvious after the event.
>
> Regards, John
Re: How do I create a CR? [message #546235 is a reply to message #545956] Mon, 12 July 2010 09:08 Go to previous message
John Ormerod is currently offline John OrmerodFriend
Messages: 39
Registered: January 2010
Member
Thanks Ketan

Had a look at Keystrokes.CR code. Saw that there is an SWT.CR constant for this which = '\r'.

John
Previous Topic:JUnit TestNG Test
Next Topic:Getting @ to work with a UK keyboard
Goto Forum:
  


Current Time: Fri Dec 19 01:46:21 GMT 2014

Powered by FUDForum. Page generated in 0.01602 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software