Support `.where` filters in Serenity/JS 3.0.0
See original GitHub issueAs per my conversation with @viper3400 on Serenity/JS Community Chat
const Dialogs = Target.all('visible modal dialogs').located(by.css('.ui-dialog'));
const DialogTitle = Target.the('dialog title').located(by.css('.ui-dialog-title'));
const DialogWithTitle = (title: string) =>
Dialogs.where(Text.of(DialogTitle), includes(title)).first();
Serenity/JS 3.0 should support Screenplay-style .where filters for nested page elements.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Serenity/JS 3.0 (RC)
To see the new PageElement and PageElements APIs in action, including using advanced element filters and mapping, have a look at the PageElements...
Read more >Support WebdriverIO · Issue #805 · serenity-js ... - GitHub
linkContainingText is easy to replace by filter queries ( PageElements...where(Text, equals(..)) ). It is a bit of a drastic move, so I'm ...
Read more >@serenity-js/core | Yarn - Package Manager
Serenity/JS is a framework designed to make acceptance and regression testing of modern full-stack applications faster, more collaborative and easier to ...
Read more >serenity-js/Contributors - Gitter
@jan-molak , I'm aware that 3.0.0 is still an RC. Though, I wonder if we could have some deprecation warning first for breaking...
Read more >Serenity-JS Select an Element from a list - Stack Overflow
I have filtered drop down list which list all tasks. When I type letters into the search box I am presented with a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

At the moment we have a common library + 2 project libraries. By now I just migrated the common library which has just some basic tests, but the
.wherelooks good so far. Thanks!This is just a first feedback, as I’m not sure, when I can try a migration of one of the main projects (and they contain much more code).
This feature will land in
3.0.0-rc.3, with a new implementation ofListsupporting both the regularArrays andPageElements.For example:
where:
Another API worth mentioning is
List.eachMappedTo:where:
I will also remove
filterandmapmethods fromPageElementssince they have proven to provide little value without theactorbeing readily available.