We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f918d9b commit b0c30a3Copy full SHA for b0c30a3
src/pageobjects/sidebar/ViewItem.ts
@@ -161,7 +161,12 @@ export abstract class TreeItem extends ViewItem {
161
async getActionButton (label: string): Promise<ViewItemAction | undefined> {
162
const actions = await this.getActionButtons()
163
if (actions.length > 0) {
164
- return actions.find((item) => item.getLabel().indexOf(label) > -1)
+ for (const item of actions) {
165
+ const itemLabel = item.getLabel() ?? await item.elem.getAttribute('aria-label')
166
+ if (itemLabel.indexOf(label) > -1) {
167
+ return item
168
+ }
169
170
}
171
return undefined
172
0 commit comments