Forum Discussion

678's avatar
678
Regular Contributor
7 years ago

how to select multiple values from one excel cell

I have a scenarios as a prereq.. i need to run function1,function2  then Testcase 1 

 

Functions are storing in Events, which trigerring from excel 

 

 

Excel - 

Single Cell -   function1,function2

 

on the even i provided 

 

if prereq == (function1)

{

run function1

}

 

and 

 

if prereq == (function2)

 

{

run function2

}

 

run testcase1 

 

 

can any one help to write a good groovy script here for this scenario 

 

 

 

  • nmrao's avatar
    nmrao
    Champion Level 3
    What is the use case?
    How the test case is designed?
    How is data source defined?
  • PaulMS's avatar
    PaulMS
    Super Contributor

    You could split the prereq by comma, or use contains if it is a very simple case.

     

    if (prereq.contains('function1'))