How to debug automation code when it is not working as expected (Selenium Interview Question #215)