I/o error (java.io.FileNotFoundException) locating image in Test Suite Log

I have the following global variable set up as a means to define where I’d like screenshot images saved:

The problem I have is while this works when the test is run from the test CASE, when run from the SUITE, the images in the test report show the following error when I hover over them:
i/o error (java.io.FileNotFoundException: [file path to .jpg here] (The system cannot find the path specified))

When I hardcode a path, it works as I’d expect it to when run from the suite. Is there a better way to handle this other than hardcoding,which then relies on what the user executing the test has defined for file path? Thanks!

Hi Morgan,

what about using relative path within your project folder?

  1. Create a global variable
  2. Open a script mode in the global variables view
  3. Change following part for the variable you created:
    <initValue>RunConfiguration.getProjectDir() + '/Relative/Path'</initValue>

They worked beautifully! Thanks a ton! Happy New Year!