I created a series of test cases around a functionality (84 cases) and if I run all test cases individually everything passes with out an issue. However when I put them in a test suite I start to have cases fail stating it can not find the web element. Again these cases all pass when running on their own. I only get issues when running the test suite. Any idea what would cause this? I even tried reducing the amount of cases in the test suite to only 25 and still had issues.
It’s possible the issue is related to timing. When running the tests individually, the elements are available, but when running the entire suite it could be running ahead and trying to find an element before it’s actually there. I’ve run into something similar. You could try adding a Delay, to pause and see if the element appears as expected after a given amount of time. If that works, you could then change it to a waitForElementVisible to be more dynamic.
I had a similar situation. What worked for me was to add a few seconds delay at the end of each test case. So there was a pause between each test case running as the suite ran. That solved the problem of when test cases ran individually they all passed fine but when run as a suite there was failures.
Screenshot of Delay I added at end of each test case that was in the test suite.
Thanks Everyone These answers pointed me to the issue. The test suite was causing some page to load longer because of how fast it moved ahead. The loading animation was causing the issue. I had to wait for the loader element to not be present in front of some steps.