 INITIALIZATION_FILE_PATH = pathUtils.join DEST, 'initialization.png'
 SCREENSHOT_TRIES = 100
 SCREENSHOT_TRY_DELAY_SEC = 0.2
-CUSTOM_SCREENSHOT_MAX_DELAY_MS = 1000
+CUSTOM_SCREENSHOT_MAX_DELAY_MS = 2000
 {LOG_SCREENSHOT_DATA_URI} = process.env
 
 if LOG_SCREENSHOT_DATA_URI


    # take the whole screen screenshot
    driver.takeScreenshot opts
    return

tryTakeScreenshot = (opts, isOk) ->

        Expected: #{expectedUri}
    """

waitForScreenshot = (path, maxDelay) ->
    startTime = Date.now()
    itertion = 0
    while Date.now() < startTime + maxDelay
        try
            stats = fs.statSync path
            if stats?.size
                return true
        childProcess.execSync "sleep 0.1"
    return false

takeScreenshot = (opts) ->
    # use target-specified screenshot function
    if opts.env
