How to get rid of blinking cursor? [message #38447] |
Tue, 09 June 2009 22:37  |
Eclipse User |
|
|
|
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 #38705 is a reply to message #38646] |
Wed, 10 June 2009 04:25  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.06993 seconds