Returning nil when unable to take screenshots on linux or windows in ruby runner