Every Selenium Step executed in DevTest will automatically take screenshot implicitly, and the screenshot can be viewed in the Portal.
You can also create an Execute script (JSR-223) step after each Selenium step you want to save the screen on with the below code, (modify the selenium.PNG per step to save multiple screen shots)
import com.itko.util.*;
import org.apache.commons.io.*; String screenEncoded = testExec.getStateObject("selenium.last.screenshot"); byte[] screenDecoded = Base64.decode(screenEncoded); FileUtils.writeByteArrayToFile(new File("c:\\temp\\selenium.PNG"),screenDecoded);
Got this from Communities post: