build/dumpScreen.py
author Bevis Tseng <btseng@mozilla.com>
Wed, 07 Jan 2015 19:25:22 +0800
changeset 266480 7b20a3e1a9bb45fbadb41983c5c02f94cadcf57f
parent 164764 ef2d30255b7a36799fcb5d2729375cb6bb6911c4
permissions -rw-r--r--
Bug 1114935 - Part 4.1: Add Support of nsIIccInfo to IccInfo. r=echen

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