Hi,
I want to make a function inside @AfterTestCase if I run singel test case it will close browser with detect any unique value from testsuite, but if I run test suite it won’t close the browse, is it possible?
Hi,
I want to make a function inside @AfterTestCase if I run singel test case it will close browser with detect any unique value from testsuite, but if I run test suite it won’t close the browse, is it possible?
How about utilizing GloableVariable?
(1) You define a GlobalVariable named, for example, ‘RUN_AS_A_TESTSUITE’ with initial value boolean false.
(2) In the TestListener method annotated @BeforeTestSuite, you want turn RUN_AS_A_TESTSUITE to true.
(3) In you test case, you want to refer to the RUN_AS_A_TESTSUITE to determine if your test case is invoked from a test suite or not.
kazurayam said:
How about utilizing GloableVariable?
(1) You define a GlobalVariable named, for example, ‘RUN_AS_A_TESTSUITE’ with initial value boolean false.
(2) In the TestListener method annotated @BeforeTestSuite, you want turn RUN_AS_A_TESTSUITE to true.
(3) In you test case, you want to refer to the RUN_AS_A_TESTSUITE to determine if your test case is invoked from a test suite or not.
Thats good Idea, let me try
Its works, thx