 
             step.function(matches)
 
-            if #available(iOS 9.0, *) {
+            if #available(iOS 9.0, OSX 10.11, *) {
                 if automaticScreenshotsBehaviour.contains(.afterStep) {
                     attachScreenshot()
                 }

            state.currentStepDepth += 1
            state.currentStepLocation = (file, line)

            if #available(iOS 9.0, *) {
                if automaticScreenshotsBehaviour.contains(.beforeStep) {
                    attachScreenshot()
                }

        guard let test = self.test, let (file, line) = test.state.currentStepLocation else { return }
        if filePath == file && lineNumber == line { return }

        if #available(iOS 9.0, OSX 10.11, *) {
            if automaticScreenshotsBehaviour.contains(.onFailure) {
                test.attachScreenshot()
            }
