I recognize that you may be working with an existing framework that is just something you have to make do with, but if you are creating this set of tests, let me suggest an alternative approach: Let’s assume that you want to run this test against a Windows SUT and a Linux SUT. The approach that I would suggest is to create a suite to run the test against the Windows SUT and have this be your main suite. Let’s assume that your Windows suite has scripts called Login, CreateItem, and Logout as well as a Master script that calls these other scripts as appropriate. Then create a Linux suite that also contains scripts called Login, CreateItem, and Logout, but of course implements the Linux specific steps for those actions and has images captured from the Linux SUT.
Now when you want to run your scripts against Windows, you simply run your Master script and it calls all the scripts in your Windows suite. When you want to run against Linux, you put the following line at the beginning of the Master script:
set the initialSuites to ("Linux")
and when your Master script calls Login, CreateItem, or Logout, it will be calling the versions of those scripts that reside in the Linux suite.