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

ViewItem.getActionButton/s hangs #61

Open
badsyntax opened this issue Dec 30, 2022 · 1 comment
Open

ViewItem.getActionButton/s hangs #61

badsyntax opened this issue Dec 30, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@badsyntax
Copy link

badsyntax commented Dec 30, 2022

VS Code version: 1.64.2

When using ViewItem.getActionButtons(), it just hangs, and eventually errors with:

Can't call getAttribute on element with selector ".//a[contains(@class, 'action-label') and @role='button' and @aria-label='undefined']" because element wasn't found

Here's the problem code:

for (const item of items) {
const elem = item.$((this.locatorMap.ViewSection.actionConstructor as () => string)())
const label = (
// v1.69.0 and before
await elem.getAttribute(this.locators.actionTitle)
// v1.70.0 and after
|| await item.getAttribute(this.locators.actionTitle)
)
actions.push(new ViewItemAction(this.locatorMap, elem, label, this))
}

This is the markup for the action button:

<a class="action-label icon" role="button" title="Information" tabindex="0" style="--menu-entry-icon-light:url(&quot;vscode-file://vscode-app/Users/richardwillis/Projects/badsyntax/vscode-entity-framework/icons/help_light.svg&quot;); --menu-entry-icon-dark:url(&quot;vscode-file://vscode-app/Users/richardwillis/Projects/badsyntax/vscode-entity-framework/icons/help_dark.svg&quot;);"></a>
@christian-bromann
Copy link
Contributor

Thanks for reporting!

Any contributions that resolves the bug are highly appreciated. Don't expect this to be picked up by active contributors as they have their own priorities. If you depend on this bug to be fixed, your contribution is required. Please take a look into our contribution guidelines or join our Discord development server and let us know if you have any questions. Cheers!

@christian-bromann christian-bromann added the help wanted Extra attention is needed label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants