TerminalView - redhat-developer/vscode-extension-tester GitHub Wiki
Lookup
import { BottomBarPanel, TerminalView } from 'vscode-extension-tester';
...
const terminalView = await new BottomBarPanel().openTerminalView();
Terminal Selection
// get names of all available terminals
const names = await terminalView.getChannelNames();
// select a terminal from the drop box by name
await terminalView.selectChannel("Git");
Execute Commands
await terminalView.executeCommand("git status");
Get Text
Select all text and copy it to a variable. No formatting provided.
- To allow copy text in terminal on macOS, you need to add specific setup in .vscode/settings.json
"terminal.integrated.copyOnSelection": true
const text = await terminalView.getText();