Skip to content

Commit

Permalink
Fix TypeError while using assert.present() in new Elem API.
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 committed Nov 18, 2024
1 parent 8f4a330 commit f7942c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api/web-element/assert/element-assertions.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module.exports.create = function createAssertions(scopedElement, {negated = fals
value(message) {
return instance.assert(async (assertApi, element) => {
const el = await element;
const id = await el.getId();
const id = await el?.getId();

return assertApi.ok(el instanceof WebElement, message || `Testing if the element <WebElement: ${id}> is present.`);
});
Expand Down

0 comments on commit f7942c0

Please sign in to comment.