Elffuss BraidHub

kikocis/continue public

627d7d0d1f85 · 616 BRawPermalink
1import { By, WebDriver } from "vscode-extension-tester";
2
3export class NextEditSelectors {
4 /**
5 * Get the SVG decoration element if present (for next edit).
6 */
7 public static async getSvgDecoration(driver: WebDriver) {
8 try {
9 const decorations = await driver.findElement(
10 // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]")
11 By.css("[class*='TextEditorDecorationType']"),
12 );
13 return decorations ?? null;
14 } catch (error) {
15 console.error("Error finding SVG decoration:", error);
16 return null;
17 }
18 }
19}