build/dumpScreen.py
author Andrea Marchesini <amarchesini@mozilla.com>
Fri, 10 Jul 2015 17:38:44 +0100
changeset 252387 0fc4dec6cd81c056e05b3fd2661f5ef80ef2f0b0
parent 149984 ef2d30255b7a36799fcb5d2729375cb6bb6911c4
permissions -rw-r--r--
Bug 1113086 - AudioChannel policy in Browser API - patch 1 - BrowserElementAudioChannel, r=ehsan

#!/usr/bin/env python

"""
test dumpScreen functionality
"""

import automationutils
import optparse
import os
import sys


def main(args=sys.argv[1:]):

    # parse CLI options
    usage = '%prog [options] path/to/OBJDIR/dist/bin'
    parser = optparse.OptionParser(usage=usage)
    options, args = parser.parse_args(args)
    if len(args) != 1:
        parser.error("Please provide utility path")
    utilityPath = args[0]

    # dump the screen to a data: URL
    uri = automationutils.dumpScreen(utilityPath)

    # print the uri
    print uri

if __name__ == '__main__':
    main()