henil_shah
8 years agoContributor
Use of Datasource step to get value from excel sheet
I have a specific requirement like below
I have an excel sheet which contains 150 tokens, I want to use that tokens only once since its non-reusable again, My test case also doesn't runs into a loop.
How can I get different value every time from data-source and how can we make sure that once all tokens are used , data-source doesn't provide me the used token. Is there any pointer to maintain which data was used last?
def x= context.expand( '${DataSource#x}' )
log.info x
//testRunner.testCase.setPropertyValue("xx", x)
testRunner.testCase.getTestStepByName('DataSource').next(testRunner, context)
I'm using this code as of now which gives me new value of x.