I am trying to take a screenshot of every Test Case and have it exported to a screenshot directory with its name.
I am using:
testName = RunConfiguration.getExecutionSourceName().toString()
but this only contains the name of the Test Suite and NOT the Test Case name.
WebUI.takeScreenshot('path'+testName+'.png')
How would I reference the Test Case name and not the Test Suite name?
Thank you.
EDIT: The code I am taking a screenshot of currently lives in the "TearDownTestCase" method located in Test Suites.