protected void chooseJavaProvider() throws InterruptedException, InvocationTargetException {

		if (GhidraScriptUtil.getProviders().size() <= 1) {
			return;
		}

		final PickProviderDialog ppd = waitForDialogComponent(PickProviderDialog.class);
		if (ppd != null) {
			SwingUtilities.invokeAndWait(() -> ppd.setSelectedProvider(new JavaScriptProvider()));
			waitForSwing();
			pressButtonByText(ppd, "OK");
			waitForSwing();
		}
	}
Run the last script by pressing the last script button and return output.

@param taskName name for the task listener
@return script output written to the console
@throws Exception on failure, e.g. timeout
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/script/AbstractGhidraScriptMgrPluginTest.java