You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using SelectorAPI.getAttribute can return undefined for attributes that are not present in the current selector.
What is the Current behavior?
SelectorAPI.getAttribute's type indicates it returns Promise<string>.
What is the Expected behavior?
SelectorAPI.getAttribute should return Promise<string | undefined>.
Your complete test code (or attach your test files):
constmySelector=Selector('a');constundefinedAttribute=mySelector.getAttribute('this-does-not-exist');constundefinedAttribute.trim();// method does not exist
The text was updated successfully, but these errors were encountered:
Our getAttribute's returned value (undefined) is not consistent with Element.getAttribute() (null). We need to fix it in our source code and type definitions.
Farfurix
changed the title
[docs]: SelectorAPI.getAttribute can return undefined but docs indicate it always returns a string
SelectorAPI.getAttribute can return undefined but docs indicate it always returns a string
Jul 15, 2021
What is your Test Scenario?
Using
SelectorAPI.getAttribute
can returnundefined
for attributes that are not present in the current selector.What is the Current behavior?
SelectorAPI.getAttribute
's type indicates it returnsPromise<string>
.What is the Expected behavior?
SelectorAPI.getAttribute
should returnPromise<string | undefined>
.Your complete test code (or attach your test files):
The text was updated successfully, but these errors were encountered: