Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Support of Nebula FormattedText widget
Support of Nebula FormattedText widget [message #42690] Fri, 10 July 2009 07:54 Go to next message
Benjamin Glaser is currently offline Benjamin GlaserFriend
Messages: 17
Registered: July 2009
Junior Member
Good morning,

I want to use SWTBot to write all the tests for our Eclipse RCP
application.
Now I got a problem with an widget that is used in the application.
It's the Nebula FormattedText widget.

The application uses a lot of these textfields.

If I use the setText() methode on a formattedText (as seen below)

bot.textWithId("key", "value").setText("65451,4545");

it only sets the text until the comma ("65451") the rest is ignored.

Mabye the problem is the Formatter the application uses for this textfield.
But if I type the same text into the formattedText widget by hand, it's
all fine.

Is there a possibility to get it working?

Benjamin
Re: Support of Nebula FormattedText widget [message #42753 is a reply to message #42690] Fri, 10 July 2009 12:02 Go to previous messageGo to next message
Pascal G is currently offline Pascal GFriend
Messages: 157
Registered: July 2009
Senior Member
Benjamin Glaser wrote:
> Good morning,
>
> I want to use SWTBot to write all the tests for our Eclipse RCP
> application.
> Now I got a problem with an widget that is used in the application.
> It's the Nebula FormattedText widget.
>
> The application uses a lot of these textfields.
>
> If I use the setText() methode on a formattedText (as seen below)
>
> bot.textWithId("key", "value").setText("65451,4545");
>
> it only sets the text until the comma ("65451") the rest is ignored.
>
> Mabye the problem is the Formatter the application uses for this textfield.
> But if I type the same text into the formattedText widget by hand, it's
> all fine.
>
> Is there a possibility to get it working?
>
> Benjamin
>
Have you tried using the typeText(String) method? This one emulates
real user input by sending OS event. The only drawback is that it only
supports (for now) a standard US keyboard.

If you plan on trying it, I suggest you set
SWTBotPreferences#KEYBOARD_STRATEGY to
"org.eclipse.swtbot.swt.finder.keyboard.SWTKeyboardStrategy"

Hope this help.
--
Pascal GĂ©linas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/

*Because performance matters.*
Re: Support of Nebula FormattedText widget [message #42846 is a reply to message #42753] Fri, 10 July 2009 13:57 Go to previous message
Benjamin Glaser is currently offline Benjamin GlaserFriend
Messages: 17
Registered: July 2009
Junior Member
I did a workaround with the typeText() methode.
That works fine after I changed the keyboard layout of my OS to US_EN.

Issue solved.

Thank you for your help.

Benjamin
Previous Topic:how to test swing code
Next Topic:swtBotEclipseEditor.typeText issue
Goto Forum:
  


Current Time: Thu Dec 18 05:44:22 GMT 2014

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

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