Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class JavaApp extends FestSwingTestCaseTemplate {
- public static void main(String[] args)
- {
- FailOnThreadViolationRepaintManager.install();
- HTMLDocumentEditor frame = GuiActionRunner.execute(new GuiQuery<HTMLDocumentEditor>() {
- protected HTMLDocumentEditor executeInEDT() {
- return new HTMLDocumentEditor();
- }
- });
- FrameFixture window = new FrameFixture(frame);
- window.show(); // shows the frame to test
- ApplicationLauncher.application(HTMLDocumentEditor.class);
- window.menuItemWithPath("File", "Open").click();
- JavaApp app = new JavaApp();
- app.testFile();
- }
- public void testFile()
- {
- JFileChooserFixture fileChooser = JFileChooserFinder.findFileChooser().using(robot());
- fileChooser.setCurrentDirectory(Files.temporaryFolder()).selectFile(new File("htmleditor.html")).approve();
- }
- Exception in thread "main" java.lang.NullPointerException
- at org.fest.swing.finder.ComponentFinderTemplate.findComponentWith(ComponentFinderTemplate.java:88)
- at org.fest.swing.finder.JFileChooserFinder.using(JFileChooserFinder.java:122)
- at org.fest.demo.JavaApp.testFile(JavaApp.java:63)
- at org.fest.demo.JavaApp.main(JavaApp.java:56)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement