Solved
Forum Discussion
mengbinhao
9 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
rraghvani
Champion Level 3
9 months agoUsing the example shown in stackoverflow, it will be
myInstance.publicMethod1()
And also shown here
- mengbinhao9 months agoContributor
I'll try this, Thanks!
- rraghvani9 months ago
Champion Level 3
It's a bit tricky to explain, since this is specific to JavaScript coding. I suggest you try the example, and within your unit test, the first line should call,
var test = SingletonFactory.getInstance()
The SingletonFactory class can be stored in a different project within the project suite, and you can call this via https://support.smartbear.com/testcomplete/docs/scripting/calling-routines/index.html
- mengbinhao9 months agoContributor
This works for me, Thank you ~
- mengbinhao9 months agoContributor
This works for me, Thank you ~