Showing results for 
Search instead for 
Did you mean: 

Data Driven testing: How do I conditionally evaluate XLS value in script?


Data Driven testing: How do I conditionally evaluate XLS value in script?



I am working on a Data Driven test using an XLS file as my input data. One column in the file indivcates whether or not to use that row's data for testing. The file contains a number of users and their login credentials. Depending on what test scenario I am conducting, some users should be skipped.


I am trying to figure out how to evaluate the value found in column [Include_In_Test] in vbscript. If the value is Y, then proceed and use this row, otherwise, skip to the next data row.


I appreciate any examples, suggestions, etc.




Community Hero

I'm not a VB guy.... but generally, the below JavaScript should be what you need to do...
if (ExcelDriverObject.Value('RunThisTest') === 'Y'){
else {

In code, that's what I would do. You can do something similar with the if...then operation in a keyword test.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available


Thank you.


New Here?
Join us and watch the welcome video:
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file


How to execute remote test and obtain results via Test Runner REST API

Top Kudoed Authors