@Test
	public void testAskDirectory() throws Exception {

		// Create temporary directories, then create a temporary .properties file that contains
		// the path to one of the temporary directory.
		String tempDirPath = AbstractGTest.getTestDirectoryPath();
		File tempDir = new File(tempDirPath);
		File tempSubDir = new File(tempDir, TEMP_SUB_DIR);
		File anotherTempSubDir = new File(tempDir, "anotherTempDir");
		File tempPropertiesFile = new File(tempDir, "tempPropertiesFile.properties");
		tempPropertiesFile.deleteOnExit();

		FileUtilities.deleteDir(tempSubDir);
		FileUtilities.deleteDir(anotherTempSubDir);
		tempPropertiesFile.delete();

		// First, create temporary dirs
		assertTrue("Directory '" + tempSubDir.getAbsolutePath() + "' should have been created!",
			tempSubDir.mkdir());

		assertTrue(
			"Directory '" + anotherTempSubDir.getAbsolutePath() + "' should have been created!",
			anotherTempSubDir.mkdir());

		// Next, create .properties file that contains the path to one of the dirs
		assertTrue("File '" + tempPropertiesFile.getAbsolutePath() + "' should have been created!",
			tempPropertiesFile.createNewFile());

		// Write the path to the file to the .properties file
		FileWriter output = new FileWriter(tempPropertiesFile);
		BufferedWriter writer = new BufferedWriter(output);
		writer.write("Choose your directory: Choose! = " + tempSubDir.getAbsolutePath());
		writer.close();

		createScript();
		final File[] myDir = new File[1];

		// Load .properties value(s)
		script.setPropertiesFile(tempPropertiesFile);

		executeOnSwingWithoutBlocking(() -> {
			try {
				myDir[0] = script.askDirectory("Choose your directory:", "Choose!");
			}
			catch (Exception e) {
				failWithException("Exception was caught in this test: " + e.getMessage(), e);
			}
		});

		GhidraFileChooser fileChooser = waitForDialogComponent(GhidraFileChooser.class);
		waitForUpdateOnDirectory(fileChooser);

		assertNotNull(fileChooser);
		pressButtonByText(fileChooser, "Choose!");

		waitForSwing();

		// Compare default value to expected properties value
		assertEquals(tempSubDir, myDir[0]);

		// Choose another directory
		executeOnSwingWithoutBlocking(() -> {
			try {
				myDir[0] = script.askDirectory("Choose your directory:", "Choose!");
			}
			catch (Exception e) {
				failWithException("Exception was caught in this test: " + e.getMessage(), e);
			}
		});

		fileChooser = waitForDialogComponent(GhidraFileChooser.class);

		fileChooser.setSelectedFile(anotherTempSubDir);
		waitForUpdateOnDirectory(fileChooser);

		pressButtonByText(fileChooser, "Choose!");
		waitForSwing();

		// Verify the directory we chose is auto-populated when the dialog comes up again
		executeOnSwingWithoutBlocking(() -> {
			try {
				myDir[0] = script.askDirectory("Choose your directory:", "Choose!");
			}
			catch (Exception e) {
				failWithException("Exception was caught in this test: " + e.getMessage(), e);
			}
		});

		fileChooser = waitForDialogComponent(GhidraFileChooser.class);
		waitForUpdateOnDirectory(fileChooser);

		pressButtonByText(fileChooser, "Choose!");
		waitForSwing();

		assertEquals(anotherTempSubDir, myDir[0]);

		FileUtilities.deleteDir(tempSubDir);
		FileUtilities.deleteDir(anotherTempSubDir);
	}
A large timeout period that is usually not reached
Ghidra/Features/Base/src/test.slow/java/ghidra/app/script/GhidraScriptAskMethodsTest.java