private File findAndTestFileChooser(File path, String filename) throws Exception {
		// get the file chooser and set the file it will use
		GhidraFileChooser fileChooser = waitForDialogComponent(GhidraFileChooser.class);
		if (fileChooser == null) {
			Msg.debug(this, "Couldn't find file chooser");
			printOpenWindows();
			Assert.fail("Did not get the expected GhidraFileChooser");
		}

		// change directories
		if (path != null) {
			fileChooser.setCurrentDirectory(path);
		}
		waitForUpdateOnChooser(fileChooser);

		File currentDirectory = fileChooser.getCurrentDirectory();
		File fileToSelect = new File(currentDirectory, filename);
		fileChooser.setSelectedFile(fileToSelect);
		waitForUpdateOnChooser(fileChooser);

		// press OK on the file chooser
		final JButton okButton = (JButton) getInstanceField("okButton", fileChooser);

		runSwing(() -> okButton.doClick());

		// wait to make sure that there is enough time to write the data
		waitForSwing();

		// make sure that the file was created or already existed
		File selectedFile = fileChooser.getSelectedFile(false);
		assertTrue("The test file was not created after exporting.", selectedFile.exists());

		return selectedFile;
	}
Tests the {@link KeyBindingUtils} class.


@since  Tracker Id 329
Ghidra/Features/Base/src/test.slow/java/ghidra/framework/plugintool/dialog/KeyBindingUtilsTest.java