Executing if statement in a test case depending on test suite


I have a test case that is being executed in multiple different test suites. Is it possible to implement the following example in a test case?

If (testSuite == testSuite1){

//Code goes here
else if (testSuite == testSuite2){

//Code goes here

Basically, executing testSuite1 uses one if statement path and executing testSuite2 uses another if statement path. Any help would be highly appreciated.

Think this is what your looking for

1 Like

Still not sure how to implement this…
Here is the idea of the code of the particular test case:


WebUI.waitForElementPresent(findTestObject("Login_Button"), 5)


if(WebUI.verifyElementVisible(findTestObject("PopUp Window Confirm_Button"), FailureHandling.OPTIONAL)){
   WebUI.click(findTestObject("PopUp Window Confirm_Button"))
    if(testSuiteBeingExecuted == testSuite1){

   //do this
else if (testSuiteBeingExecuted == testSuite2){

   //do that

What should the if statements/test listeners contain so that the script runs the desired condition?