Detect data driven value and confirm if correct

Hey everyone !

Currently I am using data-driven testing to test a long list of input fields. I am using an excel sheet with data that runs on a loop.

I have one input field where you can either put in: “Yes” or “No”. I am trying to make an if else statement where if the input from the excel sheet is “No” it skips the input field and goes to the next. I have been having trouble with this since I don’t know how to get the value from an excel sheet.

Any help would be greatly appreciated!

Hello @Funkey

When I have to do it, I use this method (I don’t know if it is the best, but works):

To use it, you have to create a test suite, link the sheet of excel and choose the fields (if test case variables is the same of the sheet, it is easier).
In the test case, you will make something like it

if(excel_variable == "Yes") {
   WebUI.setText(TestObject, "value")
}

I hope it helps you

1 Like

Thanks! Exactly what I needed

1 Like