A bit like @anon46315158 is telling you, you need to decide what your Test Case philosophy is:
Choose:
-
Test Cases should be standalone. Each TC does exactly what it needs to do to execute the user scenario and then quit.
-
Test Cases are always part of a Test Suite. Each TC can benefit from and rely on TCs that executed earlier in the suite.
Choose #1 or #2. Trying to do both, while not impossible, will likely cause confusion – especially if other people are using your code base – and even moreso if you’re new to testing.
Aside: you could consider using WebUI.callTestCase()
which, sadly, is no longer documented for some reason. But again, you’ll need to make sure dependent TCs are suitably documented as reliant on a parent/host TC.