Determine the Operating System of the SUT

I am trying to write a script which will determine what the OS of the SUT is and report back. Does anyone know how to do this or have a reference in the documentation. I have unsuccessfully been able to figure this out.

Thank in Advance for any help

I believe this should be an Eggplant FAQ if not already. You must look for image elements that uniquely are available for any given OS.


(** assumes images to use for OS search are in the Suite's images folder
and each is properly tagged with a meaningful description field **)

set allowableTypes to ( tiff, icns, ico, pict, gif, bmp, png, pdf, jpg, jpeg )
set dirPath to my folder's folder & "Images/"
repeat with each item name in files of dirPath
	if fileExtension(name) is not in allowableTypes then next repeat
	if ImageFound(name) then return FoundImageInfo()'s  Description
end repeat

Throw "OS Detection Exception", "No OS was detected"

We look at the login screen for a mac logo on mac and a win logo on windows. From that we set a global variable that we then use throughout our test bed.