Example #1
0
 def __init__(self, manuscript, timedelay):
     self.timedelay = timedelay
     self.popup = None
     self.execution_started = False
     self.windows = []
     self.instructions = []
     for line in [
         line for line in manuscript.get_instructions() if not line.startswith("#") and len(line.strip()) > 0
     ]:
         try:
             instruction = parse(line)
         except Exception:
             Logger.add_error("Can't parse instruction: '%s'" % line)
             raise
         if instruction is not None:
             self.instructions.append(instruction)
     collector = []
     for instruction in self.instructions:
         collector.append(instruction.to_unicode())
     Logger.header("Effective Instructions:\n   %s" % "\n   ".join(collector))
 def __init__(self, manuscript, timedelay):
     self.timedelay = timedelay
     self.popup = None
     self.execution_started = False
     self.windows = []
     self.instructions = []
     for line in [
             line for line in manuscript.get_instructions()
             if not line.startswith("#") and len(line.strip()) > 0
     ]:
         try:
             instruction = parse(line)
         except Exception:
             Logger.add_error("Can't parse instruction: '%s'" % line)
             raise
         if instruction is not None:
             self.instructions.append(instruction)
     collector = []
     for instruction in self.instructions:
         collector.append(instruction.to_unicode())
     Logger.header("Effective Instructions:\n   %s" %
                   "\n   ".join(collector))
Example #3
0
 def setUp(self):
     self.instruction = parse("click button (OK|Cancel)")
     self.win = Win()
     self.manuscript = Mock()
     self.manuscript.execute_next_instruction.return_value = None
Example #4
0
 def do_parse(self, text):
     self.instruction = parse(text)
Example #5
0
 def test_single_quoted_string(self):
     instruction = parse("enter text(1, 'Roger')")
     self.assertEquals("enter text(1,'Roger')", "%s" % instruction)
Example #6
0
 def do_parse(self, text):
     self.instruction = parse(text)
Example #7
0
 def test_single_quoted_string(self):
     instruction = parse("enter text(1, 'Roger')")
     self.assertEquals("enter text(1,'Roger')", "%s" % instruction)
Example #8
0
 def setUp(self):
     self.instruction = parse("click button (OK|Cancel)")
     self.win = Win()
     self.manuscript = Mock()
     self.manuscript.execute_next_instruction.return_value = None