Skip to main content



      Home
Home » Eclipse Projects » SWTBot » How do I create a CR?
How do I create a CR? [message #545956] Fri, 09 July 2010 13:19 Go to next message
Eclipse UserFriend
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 12:29 Go to previous messageGo to next message
Eclipse UserFriend
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 05:08 Go to previous message
Eclipse UserFriend
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: Thu Jul 24 20:54:05 EDT 2025

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

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

Back to the top