[...] Hey, where’s my unashamedly ugly wait asks the question, then answers it. Sorta. Of course, the answer is in Java so is still ugly… [...]
You could squeeze out a little more ugly by making pageTitleStartsWith static and using a static import:import static com.something.ExpectedConditionFactory.*;wait.until(pageTitleStartsWith(TITLE_OF_PAGE_STARTS_WITH_THIS));
I could indeed. Thanks for mentioning this option.Alan
Its such a shame that Java doesnt seem to have Delegates and Lambdas built in the way C# does (last time i checked at least). C# does stuff like this so cleanly, java needs to do something similar. Interesting to see how you got around this though.
I grew up with 68000 Assembler, Fortran, Cobol and VB6. I've learned to see the inner beauty within programming languages.:)Thanks for the comment Roland. I've subscribed to your rss feed.Alan