Please post your Web Driver questions in official Web Driver forum

Sunday, July 1, 2018

I have been offered a Ferrari

Not for real :) I had a fun conversation with a recruiter on LinkedIn and jotting it down here. I have masked/removed the sensitive data -


Hi Tarun, I lead the Tech division in XYZ - I'm pretty active in the XYZ tech scene so I wanted to introduce myself. Out of curiosity, how are things going in XYZ? Could a new job get your attention somehow...? (For example, a free Ferrari) I can't promise a new Ferrari (maybe a Porsche?) but I would like to know what will grab your attention (such as more responsibility or a salary increase). Then, I can keep your goals in mind and tell you about relevant opportunities. How does that sound? If now isn't the right time to move that's also okay. I'd still like to chat to you so that when you are ready, we've already gotten the introductions out of the way. :) Look forward to hearing from you!

Sunday, May 13, 2018

Become an Author

Do you want to share you testing expertise with other?
Do you want to let others know how you tested that complex module either though manual testing or in automated manner?
Then become an author at seleniumtests.com, drop me a line at tkumarb at gmail dot com and let's spread the knowledge together.

Sunday, July 23, 2017

Do you check for absence of element on page

When writing automated tests we often check presence or absence of element for assertion conditions. This is usually written as - 

assertTrue("Element is missing. Bug!!!", pageObject.isSomeElementDisplayed());

And when element is not displayed then above mentioned assert statement fails.

In the similar manner we can write following assert statement to check for absence of element - 

assertFalse("Element is present. Bug!!!", pageObject.isSomeElementDisplayed());

Above mentioned assert statement would fail if element is displayed on page.

Everything looks ok, is not it. Not really, there is catch. Let's have a closer look at assertFalse statement we used above - 


assertFalse("Element is present. Bug!!!", pageObject.isSomeElementDisplayed());

This assert statement would also succeed even if webpage results in 404/500 or any other error page, since error page would also be missing the element on which we are performing assert.

So what is the solution? My recommendation is to not use check for absence of element but presence of element for assertion. What do you think of this approach?
Fork me on GitHub