Writing automated tests means writing code. It means going through processes that regular code goes through. Like code review, and refactoring. I see a lot of hesitation when it comes to refactoring one’s own code, possibly because we feel that if our code needs correction, we did a crappy job writing it the first time. But that is not the case, and refactoring should be seen as a good thing. It is meant for changing something from good to even better. Continue reading Refactoring is allowed
Do you know this situation, when you implemented some automated tests based on a requirement, but a test has been failing for ages because a bug in the implementation was never fixed? Continue reading A bug is still a bug
Element text is something you will often check for when writing Selenium tests. Whether it equals a given String, or contains a given String. But you can extend your checks to whether: the element text equals/contains a String ignoring the case of the two, or whether the element text equals/contains a String ignoring any whitespace the two might contain. Continue reading thewaiter: wait for WebElement text. To equal, contain a String with variations.
A very hot topic when testing with Selenium is how to wait for a WebElement to be displayed. I wrote about this some while back, and that post is one of my most read on this blog. In this new post i will revisit the subject, by providing a new version of that method, using Java 8. It can be found in ‘thewaiter’ library in two variants: with a default timeout, and with a signature that allows a timeout parameter to be specified when calling it. Continue reading thewaiter: wait for an element to be displayed with Selenium