webdriverio-community / wdio-vscode-service

A service to test VSCode extensions from end to end using WebdriverIO

Home Page:https://webdriverio-community.github.io/wdio-vscode-service/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ViewItem.getActionButton/s hangs

badsyntax opened this issue · comments

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>

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!