How to store list of string in serenity screenplay

22 Views Asked by At

So I just recently migrated to serenity 4.1.3 from 2.0.30 and I'm trying to do this: List<String> x = Text.of(ThePage.element()).viewedBy(actor).asList();

and this is what I'm trying to do in 4.1.3: List<String> x = actor.asksFor(Text.of(ThePage.element()).asListOf(String.class);

but i get the error "java.lang.String cannot be cast to class java.util.list"

0

There are 0 best solutions below