def dumpScreen(self, utilityPath): if self.haveDumpedScreen: self.log.info("Not taking screenshot here: see the one that was previously logged") return self.haveDumpedScreen = True automationutils.dumpScreen(utilityPath)
def dumpScreen(self, utilityPath): if self.haveDumpedScreen: log.info( "Not taking screenshot here: see the one that was previously logged" ) return self.haveDumpedScreen = True dumpScreen(utilityPath)
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