Its very easy actually.
You can use a Text widget where the user can enter the path. Normally you will
have that Text widget anyway on your GUI since you want to show the path after
it is being selected by the File Chooser. Instead of setting the Text widget to
read only, enable text input for the user and validate its input by checking if
"new File(path).exists()" returns true.
In the test you don't automate the File Chooser but simply set text in the text
box, which works since it is no native dialogs.
If possible I would avoid native dialogs. They have other side effects, for
example they cannot be localized I think. If you set the language to German for
instance and run it on a English Operating System, the native dialogs will show
English texts. They cannot be translated with the resource bundle I think.
Concerning file chooser there is this testability workaround which I described
above.
--- On Wed, 10/8/08, Veneet <[EMAIL PROTECTED]> wrote:
From: Veneet <[EMAIL PROTECTED]>
Subject: [SWTBot-users] is there a work around for the File Open Dialog
To: [email protected]
Date: Wednesday, October 8, 2008, 3:41 AM
Hi guys ,
Has anyone found a work around for a File Open Dialog...
if yes alittle desc. plz
Thanks
B bye!
Veneet
--
View this message in context:
http://www.nabble.com/is-there-a-work-around-for-the-File-Open-Dialog-tp19873914p19873914.html
Sent from the SWTBot Users List mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SWTBot-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SWTBot-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse