vscode-extension-tester
vscode-extension-tester copied to clipboard
[π Request] Add new feature to interact with conditional breakpoint input box
What is the feature you are missing? Trying to write a test where I can validate a conditional breakpoint and I came across multiple issues, there is no direct API to set a conditional breakpoint but I thought that I have a workaround for that:
- Go to the line you need the breakpoint
- Execute
await new Workbench().executeCommand('Debug: Add Conditional Breakpoint');
- Type into the 'Expression' box that is currently open
until, I came across point number 3 where I can not type into that box, as it is not an input box or any element that I can catch using findElement or any other method, apparently is a span
that does activate only when you type in it.
If we can add a new API under the EditorView functionality that can be used to toggle a conditional breakpoint, something like toggleConditionalBreakpoint(line: number, expression?: string, hitCount?: number, logMessage?: string)
Could you provide some example of usage? I can present some use cases:
- Interacting with the message box that appears on VSCode when you set an invalid conditional breakpoint.
- Validating the hit counts on a specific breakpoint in a loop.
I wrote an article regarding my experience with your extension, check it out MEDIUM ARTICLE LINK
Thank you for sharing your article @sergiuilie !
So problem with this request is already mentioned by you. Opened box is represented by pseudo-element (::after) which is not a actual DOM element and itβs not possible to interact with it using WebDriver. Span is activated after some text is provided. We are not able to provide solution for this now as I was not able to find any workaround for this. Focusing on parent elements with interest to send text into Expression (or any other option from selection box) is not working as well.
So problem with this request is already mentioned by you. Opened box is represented by pseudo-element (::after) which is not a actual DOM element and itβs not possible to interact with it using WebDriver. Span is activated after some text is provided. We are not able to provide solution for this now as I was not able to find any workaround for this. Focusing on parent elements with interest to send text into Expression (or any other option from selection box) is not working as well.
Thanks for looking into this