Skip to content

Update README for Java 8 functional interface #27

Open
@danizen

Description

@danizen

Since both FluentMatcher and FluentWebElementVistor are single function interfaces, they can be used with Java 8 lambda functions. This is wonderful! kudos.

Please update the README when discussing each of these to provide an example of the lambda equivalent, e.g.

// Note that FluentMatcher is also compatible with Java 8 lambda functions:
listofMatching elements = fwd.inputs(className("bar").filter(
    (FluentWebElement el, int ix) -> true
);

And similarly for FluentWebElementVisitor.

It would also be great to provide a stream of these, but that is more complicated and might break backwards compatibility with Java 7 compilation. I'd argue that this is still worth it - if your user is still using Java 7, they are likely not keeping up with Selenium changes, but since sometimes these must be done because of new browsers, I'll let you guys decide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions