DevTools is the best friend of anyone writing Automated Tests, but here are some tips and tricks to make it even better! Run these commands by opening DevToolsand typing them into the console

Checks uniqueness of a CSS selector and returns the location of all elements found.

Locates the element and clicks it, this helps confirm if a click command will work or not.

Another way of checking the uniqueness of CSS selector

A way to check uniqueness of an XPath

Find elements within a Shadow DOM

C# Helper classes

Making your code reusable is a must, and helper classes are a great way to do this. Whenever you have to do something new and different, whether it be switching an iframe, taking a screen shot, handling a link that opens in a new window, handling file downloads/uploads (these are just a few of the ones I have done over the years) or whatever else it might be, taking that few minutes extra to make it reusable from a helper class is 100% worth the investment.

Shadow DOM

Need to select an element in a Shadow DOM and can’t in you C# framework? Well this blog post will sort you right out

Want more?

I’ll add updates to this post overtime for anything that doesn’t deserve its own post, and links to those that do. If you have any questions though leave a comment and I’ll see what I can do to help.

In the mean time, why not check out some of my other blog posts.

Subscribe to The Quality Duck

Did you know you can now subscribe to The Quality Duck? Never miss a post but getting them delivered direct to your mailbox whenever I create a new post. Don’t worry, you won’t get flooded with emails, I post at most once a week.