{
  "testingHooks": {
    "lambdaTest": [
      {
        "hookName": "lambda-status",
        "description": "To mark test session as pass or fail",
        "example": "executeScript(\"lambda-status=passed\");"
      },
      {
        "hookName": "lambda-name",
        "description": "To set the human readable name of test session",
        "example": "executeScript(\"lambda-name=TestName\");"
      },
      {
        "hookName": "lambda-file-exists",
        "description": "Verify file exists in download folder of vm",
        "example": "executeScript(\"lambda-file-exists=file-name.file_format\");"
      },
      {
        "hookName": "lambda-file-stats",
        "description": "Retrieve file metadata such as md5 code, modified time, name and size",
        "example": "executeScript(\"lambda-file-stats=file-name.file_format\");"
      },
      {
        "hookName": "lambda-file-content",
        "description": "Download file content using base64 encoding",
        "example": "executeScript(\"lambda-file-content=file-name.file_format\");"
      },
      {
        "hookName": "lambda-file-list",
        "description": "List files in downloads directory matching a pattern",
        "example": "driver.execute_script(\"lambda-file-list=sample\");"
      },
      {
        "hookName": "lambda-build",
        "description": "To update build name",
        "example": "executeScript(\"lambda-build=BUILD_NAME\");"
      },
      {
        "hookName": "lambda-action",
        "description": "To update test status, name and reason field",
        "example": "action=dict()\naction[\"name\"]=\"tmp name\"\naction[\"status\"]=\"failed\"\naction[\"reason\"]=\"tmp reason\"\ndriver.execute_script('lambda-action', action)"
      },
      {
        "hookName": "lambda-breakpoint",
        "description": "To abort the test to use live interaction",
        "example": "driver.executeScript(\"lambda-breakpoint=true\");"
      },
      {
        "hookName": "lambda-screenshot",
        "description": "To take async screenshots",
        "example": "driver.executeScript(\"lambda-screenshot=true\");"
      },
      {
        "hookName": "lambda-files-delete",
        "description": "To delete files from the download folder of the vm",
        "example": "driver.executeScript(\"lambda-files-delete=file1.csv,file2.csv\");"
      },
      {
        "hookName": "lambda-throttle-network",
        "description": "To throttle the network",
        "example": "executeScript(\"lambda-throttle-network\",\"Regular 4G\")"
      },
      {
        "hookName": "lambda-ping",
        "description": "To fetch IPs of the domain",
        "example": "driver.executeScript(\"lambda-ping=lambdatest.com\");"
      },
      {
        "hookName": "lambda-exceptions",
        "description": "To upload the exceptions captured on console",
        "example": "driver.executeScript('lambda-exceptions', [[message]])"
      },
      {
        "hookName": "lambda-perform-keyboard-events",
        "description": "To perform keyboard events (e.g., Ctrl+A, Ctrl+C)",
        "example": "driver.executeScript(\"lambda-perform-keyboard-events:^a\");"
      },
      {
        "hookName": "lambda-get-clipboard",
        "description": "To print the clipboard data on console",
        "example": "driver.executeScript(\"lambda-get-clipboard\");"
      },
      {
        "hookName": "lambda-set-clipboard",
        "description": "To set the clipboard content",
        "example": "driver.executeScript(\"lambda-set-clipboard= Amit\");"
      },
      {
        "hookName": "lambda-clear-clipboard",
        "description": "To clear the clipboard",
        "example": "driver.executeScript(\"lambda-clear-clipboard\");"
      },
      {
        "hookName": "lambda-unbound-ping",
        "description": "To fetch IPs from unbound domain",
        "example": "driver.executeScript(\"lambda-unbound-ping=lambdatest.com\");"
      }
    ],
    "browserStack": [
      {
        "hookName": "fileExists",
        "description": "Verify if a file exists",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"fileExists\", \"arguments\": {\"fileName\": \"<file name>\"}}')"
      },
      {
        "hookName": "getFileProperties",
        "description": "Get properties of a file",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"getFileProperties\", \"arguments\": {\"fileName\": \"<file name>\"}}')"
      },
      {
        "hookName": "getFileContent",
        "description": "Get content of a file",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"getFileContent\", \"arguments\": {\"fileName\": \"<file name>\"}}')"
      },
      {
        "hookName": "saveFile",
        "description": "Save a file",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"saveFile\"}')"
      },
      {
        "hookName": "uploadFile",
        "description": "Upload a file",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"uploadFile\", \"arguments\": {\"fileName\":\"<file_name>\"}}')"
      },
      {
        "hookName": "sendBasicAuth",
        "description": "Handle basic authentication",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"sendBasicAuth\", \"arguments\": {\"username\":\"<username>\", \"password\": \"<password>\", \"timeout\": \"<time in milliseconds>\"}}')"
      },
      {
        "hookName": "dismissBasicAuth",
        "description": "Dismiss basic authentication dialog",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"dismissBasicAuth\",\"arguments\": {\"timeout\": \"<time in milliseconds>\"}}')"
      },
      {
        "hookName": "acceptSsl",
        "description": "Accept SSL certificates",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"acceptSsl\"}')"
      },
      {
        "hookName": "setSessionStatus",
        "description": "Set status of test session",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"setSessionStatus\", \"arguments\": {\"status\":\"passed\", \"reason\": \"Title matched!\"}}')"
      },
      {
        "hookName": "setSessionName",
        "description": "Set name of test session",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"setSessionName\", \"arguments\": {\"name\": \"<test-name>\"}}')"
      },
      {
        "hookName": "annotate",
        "description": "Add annotations to test",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"annotate\", \"arguments\": {\"type\": \"logging\", \"data\": \"Some Data\"}}')"
      },
      {
        "hookName": "biometric",
        "description": "Handle biometric authentication",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"biometric\", \"arguments\": {\"biometricMatch\": \"pass\"}}')"
      },
      {
        "hookName": "cameraImageInjection",
        "description": "Inject camera image",
        "example": "driver.execute_script('browserstack_executor: {\"action\": \"cameraImageInjection\", \"arguments\":{ \"imageUrl\":\"media://<session_id>\" }}')"
      },
      {
        "hookName": "injectAudio",
        "description": "Inject audio",
        "example": "runCameraImageAndAudioInjectionHandler(keyObject, requestStateObj, parsedCommand, 'audio');"
      },
      {
        "hookName": "startAudio",
        "description": "Start audio",
        "example": "runControlAudioHandler(keyObject, requestStateObj, 'start');"
      }
    ]
  },
  "featureComparison": {
    "fileOperations": {
      "lambdaTest": [
        "lambda-file-exists",
        "lambda-file-stats",
        "lambda-file-content",
        "lambda-file-list",
        "lambda-files-delete"
      ],
      "browserStack": [
        "fileExists",
        "getFileProperties",
        "getFileContent",
        "saveFile",
        "uploadFile"
      ]
    },
    "sessionManagement": {
      "lambdaTest": [
        "lambda-status",
        "lambda-name",
        "lambda-build",
        "lambda-action",
        "lambda-breakpoint"
      ],
      "browserStack": ["setSessionStatus", "setSessionName", "annotate"]
    },
    "networkAndSecurity": {
      "lambdaTest": [
        "lambda-throttle-network",
        "lambda-ping",
        "lambda-unbound-ping"
      ],
      "browserStack": ["sendBasicAuth", "dismissBasicAuth", "acceptSsl"]
    },
    "deviceControls": {
      "lambdaTest": [
        "lambda-perform-keyboard-events",
        "lambda-get-clipboard",
        "lambda-set-clipboard",
        "lambda-clear-clipboard"
      ],
      "browserStack": [
        "biometric",
        "cameraImageInjection",
        "injectAudio",
        "startAudio"
      ]
    },
    "other": {
      "lambdaTest": ["lambda-screenshot", "lambda-exceptions"],
      "browserStack": []
    }
  }
}
