fix monkey testing setting of options to add necessary prefix

This commit is contained in:
Vincent Sanders 2019-07-01 23:27:45 +01:00
parent 1ae0ee21ee
commit e01bbee405
2 changed files with 4 additions and 4 deletions

View File

@ -208,9 +208,9 @@ def run_test_step_action_launch(ctx, step):
ctx['browser'] = DriverBrowser(monkey_cmd=[ctx["monkey"]], quiet=True, wrapper=ctx.get("wrapper"))
assert_browser(ctx)
ctx['windows'] = dict()
for arg in step.get('args', []):
print(get_indent(ctx) + " " + arg)
ctx['browser'].pass_options(arg)
for option in step.get('options', []):
print(get_indent(ctx) + " " + option)
ctx['browser'].pass_options(option)
def run_test_step_action_window_new(ctx, step):

View File

@ -160,7 +160,7 @@ class Browser:
def pass_options(self, *opts):
if len(opts) > 0:
self.farmer.tell_monkey("OPTIONS " + (" ".join(opts)))
self.farmer.tell_monkey("OPTIONS " + (" ".join(['--' + opt for opt in opts])))
def on_monkey_line(self, line):
parts = line.split(" ")