Forum Discussion
- SmartBear_SuppoSmartBear Alumni (Retired)Hi Claire,
please try
def model = testRunner.testCase.testSteps["DataSource"].dataSource.gridModel
model.setValueAt( "1", 0, 0 )
model.setValueAt( "2", 1, 0 )
Does that work ok?
regards!
/Ole
eviware.com - Claire_KaplanOccasional ContributorHi Ole
It worked
Thanks - Claire_KaplanOccasional ContributorHi
Is there a way I can get the values at a cell location in the data source?
I tried
def model = testRunner.testCase.testSteps["DataSource"].dataSource.gridModel
model.getValueAt( 0, 0 )
but it did not work.
Regards
Shalabh - SmartBear_SuppoSmartBear Alumni (Retired)Hi,
the gridModel is a standard swing TableModel so getValueAt( row, column ) should work just fine.. in what way did it not work for you?
regards!
/Ole
eviware.com - Claire_KaplanOccasional ContributorHi
I am using it in Script assertion. It does not work there.
It work in Groovy Script though.
Regards
Shalabh - SmartBear_SuppoSmartBear Alumni (Retired)Hi!
ah.. in a script assertion you do not access to the testRunner, you need to use
def model = messageExchange.request.testStep.testCase.testSteps["DataSource"].dataSource.gridModel
model.getValueAt( 0, 0 )
instead.. does that help?
regards,
/Ole
eviware.com
Related Content
Recent Discussions
- 6 days ago