CustomEditor
In case your extension contributes a CustomEditor/CustomTextEditor. Both are based on a webview, and the page object is a combination of a Webview and common editor functionality.
Lookup
Section titled “Lookup”import { CustomEditor } from 'vscode-extension-tester'...// make sure the editor is opened by nowconst editor = new CustomEditor();Webview
Section titled “Webview”The whole editor is serviced by a WebView, we just need to get a reference to it.
const webview = editor.getWebView();Common Functionality
Section titled “Common Functionality”Most editors share this:
// check if there are unsaved changesconst dirty = await editor.isDirty();// saveawait editor.save();// open 'save as' promptconst prompt = await editor.saveAs();// get titleconst title = await editor.getTitle();// get the editor tabconst tab = await editor.getTab();