pojosontheweb / selenium-utils

selenium-utils
Apache License 2.0
12 stars 5 forks source link

Groovy extensions (operators) #12

Closed vankeisb closed 9 years ago

vankeisb commented 9 years ago

We could have (even more) compact Findr code when using Groovy via :

Closures should be allowed everywhere a Predicate or Function is passed (where and eval basically).

f.where { WebElement e ->
    ...
}
.eval { WebElement e -> 
    ...
}

Operators could be combined in order to create more compact Findr chains, with less boilerplate.

Findr f = ...
Findr f2 = f + isDisplayed() + { e -> ... }
ListFindr lf = ...
ListFindr lf2 = lf + isDisplayed() + { e -> ... }

And many more. The idea is to allow to express and eval Findrs clearly and concisely.

vankeisb commented 9 years ago

enough at the moment, will probably need refinement later.