Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🚫 Bug] WebviewView switchToFrame gets wrong iframe #1492

Open
daniel-a126 opened this issue Aug 22, 2024 · 0 comments
Open

[🚫 Bug] WebviewView switchToFrame gets wrong iframe #1492

daniel-a126 opened this issue Aug 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@daniel-a126
Copy link

Describe the bug

When there are multiple Web views active in the VS Code then webview.switchToFrame() might not return the expected Web view.

This is related to the change ebc50cc released in 8.6.0 that introduces a new, less specific locator in 1.90.0.ts#L23.

The selected frame is not the same as before breaking previously working tests (Welcome walkthrough frame is not considered).

Steps to reproduce

1. Open VS Code
2. Open any sidebar with web view panel (e.g. GitLens)
2. Open Help > Welcome
3. Navigate to Get started with VS Code > Chooses your theme
4. Open dev tool (command – Developer: Toggle Developer Tools)
5. Execute old locator: $x("//div[not(@class)]/iframe[@class='webview ready' and not(@data-parent-flow-to-element-id)]");
6. Execute new locator: $x("//div[not(@data-parent-flow-to-element-id)]/iframe[@class='webview ready']");

Observe:
- Old locator returns only the the sidebar view panel's web view(s)
- New locator returns sidebar view panel's web views(s) + the Welcome page web view (at the top position)

Logs

n/a

Operating System

macOS 14.6.1

Visual Studio Code

1.92.2

vscode-extension-tester

8.6.0

NodeJS

18.19.0

npm

10.2.3

@daniel-a126 daniel-a126 added bug Something isn't working new-issue New issue which was not discussed yet labels Aug 22, 2024
@djelinek djelinek removed the new-issue New issue which was not discussed yet label Sep 12, 2024
@djelinek djelinek self-assigned this Sep 12, 2024
@djelinek djelinek added this to the NEXT milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants