Friday, 3 June 2011

Selenium 2.0rc2 - Hey, where’s my unashamedly ugly wait

This post has been moved to the blog: Selenium Simplified

5 comments:

  1. [...] 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… [...]

    ReplyDelete
  2. 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));

    ReplyDelete
  3. Alan Richardson7 June 2011 at 12:09

    I could indeed. Thanks for mentioning this option.

    Alan

    ReplyDelete
  4. 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.

    ReplyDelete
  5. 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

    ReplyDelete