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
Sometimes you "look for something" and sometimes you "get something". If you look for something, it may not exists. If you get something, it is an error if it does not exist.
In my test cases I want to use a get method on the wrapper. And get a clear error describing that what I was looking for cannot be found.
What does the proposed API look like?
In Wrapper.js
/** * Gets first node in tree of the current wrapper that * matches the provided selector. */get(rawSelector: Selector): Wrapper{constfound=find(rawSelector)if(foundinstanceofErrorWrapper){thrownewError(`Unable to find ${rawSelector} within: ${this.html()}`)}returnfound}
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
Sometimes you "look for something" and sometimes you "get something". If you look for something, it may not exists. If you get something, it is an error if it does not exist.
In my test cases I want to use a get method on the wrapper. And get a clear error describing that what I was looking for cannot be found.
What does the proposed API look like?
In Wrapper.js
The text was updated successfully, but these errors were encountered: