Skip to content

Commit 5df5582

Browse files
LKuchnokligarski
andauthored
Update FabricExample/e2e/e2e-utils.ts
Co-authored-by: Krzysztof Ligarski <63918941+kligarski@users.noreply.github.com>
1 parent a8e0642 commit 5df5582

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

FabricExample/e2e/e2e-utils.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ export async function getElementAttributes(
7272
testLabel: string,
7373
): Promise<ElementAttributes> {
7474
const attrs = await element(by.label(testLabel)).getAttributes();
75+
76+
if ('elements' in attrs) {
77+
throw new Error(
78+
`Multiple elements (${attrs.elements.length}) found for label: "${testLabel}". `
79+
);
80+
}
81+
7582
return attrs as ElementAttributes;
7683
}
7784

0 commit comments

Comments
 (0)