I want to get the value from a Property by a testStep level with groovy script, but the code that I've found isn't working.
I've searched through the internet also smart bear guides, but I didn't find it.
the error that I was receiving with this code is:
groovy.lang.MissingMethodException: No signature of method: java.util.HashMap.getPropertyValue() is applicable for argument types: (java.lang.String) values: [ArquivoCenarios] error at line: 8
The last line of my code below is line 8.
import jxl.* import jxl.write.* //planilhaExcel = "C:\\transfer\\data2.xls" def planilhaExcelObj = testRunner.testCase.testSteps.getPropertyValue("ArquivoCenarios")
thank you for helping me.
I have tried this:
planilhaExcel = context.testCase.getPropertyValue('ArquivoExcel') log.info planilhaExcel
But the return to this log.info is null
Wed Oct 09 11:52:08 BRT 2019:INFO:null
Hi @Heidji ,
You can use below code:
def data = testRunner.testCase.getTestStepByName("Properties").getPropertyValue("ArquivoCenarios")
Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓