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: correct issue with getActionButton not finding the correct item #122

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/pageobjects/sidebar/ViewItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,12 @@ export abstract class TreeItem extends ViewItem {
async getActionButton (label: string): Promise<ViewItemAction | undefined> {
const actions = await this.getActionButtons()
if (actions.length > 0) {
return actions.find((item) => item.getLabel().indexOf(label) > -1)
for (const item of actions) {
const itemLabel = item.getLabel() ?? await item.elem.getAttribute('aria-label')
if (itemLabel.indexOf(label) > -1) {
return item
}
}
}
return undefined
}
Expand Down
Loading