build/dumpScreen.py
author Ed Morley <emorley@mozilla.com>
Mon, 09 Jun 2014 11:28:02 +0100
changeset 187537 1208d93b94286cbb4135321cf67c8f1b3098ddd5
parent 149997 ef2d30255b7a36799fcb5d2729375cb6bb6911c4
permissions -rw-r--r--
Backed out changeset 820e34a74647 (bug 890570)

#!/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()