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
Following up on the comment below, we'd like to make LocatorPromise (augmented Promise<Locator>) act as much like a locator as possible, within reason...
I've changed some of my code to use .findByRole(...) recently and something I've noticed which is quite annoying is that it's quite jarring that it returns Promise<Locator>.
In practice, you sometimes end up writing code like this:
awaitscreen.findByRole('button',{name: 'Apply'});awaitscreen.getByRole('button',{name: 'Apply'}).click();// -- or --constapplyButton=awaitscreen.findByRole('button',{name: 'Apply'});awaitapplyButton.click();
But wishing that you could continue to chain Locator methods onto the Promise<Locator>, like so:
Could the concept of LocatorPromise providing a .within() method be extended to support calling other Locator methods directly upon the LocatorPromise or would this cause problems?
The text was updated successfully, but these errors were encountered:
Following up on the comment below, we'd like to make
LocatorPromise
(augmentedPromise<Locator>
) act as much like a locator as possible, within reason...#501 (comment)
The text was updated successfully, but these errors were encountered: