Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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: Mon May 12 13:52:37 EDT 2025

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

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

Back to the top