I created page object model framework using Selenium Web Driver,TestNG and ANT.
Problem: Single Test case is executed successfully but while executing them together some test cases fail.
Reason:
- Network issue.
- Browser is not able render DOM quickly which creates
StaleElementException
,NoSuchElementExeception
etc. - Server is taking time to respond to request
Work Around: In my framework I am re-running failed test cases automatically.