Solved
Forum Discussion
rraghvani
Champion Level 3
9 months agoRefer to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static you can create a static class, which will be the first thing that will be called before any test scripts are run.
mengbinhao
9 months agoContributor
Could you show me a simple example? After I define a static class, How do I use it?
Run static class first , then other testcase can get real-time value of Object inited by this static class?
- rraghvani9 months ago
Champion Level 3
There's a number of examples shown here https://stackoverflow.com/questions/1479319/simplest-cleanest-way-to-implement-a-singleton-in-javascript which uses singleton class
- mengbinhao9 months agoContributor
I know how to define static class or single design pattern, I just don't know how to get static class value in TestCompelte