Skip to content

Commit

Permalink
improve test-element isDisplayed method
Browse files Browse the repository at this point in the history
  • Loading branch information
iuliaib committed Mar 31, 2021
1 parent e77f260 commit 5e913f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/testing/src/lib/core/test-element.ts
Expand Up @@ -143,7 +143,12 @@ export class TestElement {
* Test whether this element is currently displayed.
*/
async isDisplayed(): Promise<boolean> {
return this.elementFinder.isDisplayed();
try {
await this.elementFinder.isDisplayed();
return true;
} catch {
return false;
}
}

/**
Expand Down

0 comments on commit 5e913f9

Please sign in to comment.