HCLTech interview question

How do you debug a failed automation script and identify the root cause?