Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How to get rid of blinking cursor?
How to get rid of blinking cursor? [message #38447] Tue, 09 June 2009 22:37 Go to next message
Steven Chamberlin is currently offline Steven Chamberlin
Messages: 30
Registered: July 2009
Member
Sorry if it's a simple question , but ... I'm testing SWT-Bot with
Eclipse, andiIn the "Save As" dialog box of a file, the cursor next to
"File name:" is blinking.

The following 2 don't work (it just hangs):

bot.text("File name:").typeText("filename.txt");
bot.text("File name:").typeText("filename.txt");

It seems to want something and I'm not sure what. Basically swtbot gets
stuck and is waiting for something and just hangs like that with the
blinking cursor ... What is it looking for / waiting for?

Thanks!

-- Steve
Re: How to get rid of blinking cursor? [message #38547 is a reply to message #38447] Wed, 10 June 2009 02:21 Go to previous messageGo to next message
Stefan Seelmann is currently offline Stefan Seelmann
Messages: 11
Registered: July 2009
Junior Member
Hi Steve,

please see the FAQ 1.10 [1].

Kind Regards,
Stefan

[1] http://wiki.eclipse.org/SWTBot/FAQ

Steven Chamberlin wrote:
> Sorry if it's a simple question , but ... I'm testing SWT-Bot with
> Eclipse, andiIn the "Save As" dialog box of a file, the cursor next to
> "File name:" is blinking.
> The following 2 don't work (it just hangs):
>
> bot.text("File name:").typeText("filename.txt");
> bot.text("File name:").typeText("filename.txt");
>
> It seems to want something and I'm not sure what. Basically swtbot gets
> stuck and is waiting for something and just hangs like that with the
> blinking cursor ... What is it looking for / waiting for?
>
> Thanks!
>
> -- Steve
>
Re: How to get rid of blinking cursor? [message #38646 is a reply to message #38547] Wed, 10 June 2009 03:07 Go to previous messageGo to next message
Steven Chamberlin is currently offline Steven Chamberlin
Messages: 30
Registered: July 2009
Member
that's unfortunate :(

How do I know if a dialog is "native" or not and thus subject to that
restriction?

Thanks!

Steve
Re: How to get rid of blinking cursor? [message #38705 is a reply to message #38646] Wed, 10 June 2009 04:25 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
On 10/6/09 12:37, Steven Chamberlin wrote:
> that's unfortunate :(
>
> How do I know if a dialog is "native" or not and thus subject to that
> restriction?

If the type of the dialog is FileDialog, ColorDialog, DirectoryDialog,
FontDialog, MessageBox, PrintDialog, perhaps more.

Look at subclasses of org.eclipse.swt.widgets.Dialog for more of these.
Not all of them are native dialogs though.

Hint -- if you do wish to type in into the dialogs, use
KeyboardFactory#getAWTKeyboard() and type away :) You may need to do the
typing in another thread. Make sure it's completely fail-proof swtbot
cannot handle dialogs so the test may leave the dialog open and your app
in a hung up state.

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr
Previous Topic:Re: [SWTBot-users] SWTBot Spinner Support
Next Topic:An ETA on merging swtbot4gef into swtbot?
Goto Forum:
  


Current Time: Wed Aug 27 13:21:03 EDT 2014

Powered by FUDForum. Page generated in 0.01784 seconds