There are two main reasons for flaky automated tests. 1) Poor Locator Strategy. Find a methodology that is testable before you have to depend upon it in your automated testing. I just posted a video on this topic a week ago, which shares why our team exclusively utilizes xPath for some of the most reliable locators you can build. Realize xPath has got a bad rap and is often demonstrated online in
![Test Flakiness - One of the main challenges of automated testing (Part II)](https://cdn-ak-scissors.b.st-hatena.com/image/square/6571391198fcb45e4d7c5cab7d90e5ca2fbf4605/height=288;version=1;width=512/http%3A%2F%2F2.bp.blogspot.com%2F-7bZ5EziliZQ%2FVynIS9F7OAI%2FAAAAAAAASQ0%2FBJFntXCAntstZe6hQuo5KTrhi5Dyz9yHgCK4B%2Fs1600%2Fgooglelogo_color_200x200.png)